<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) Kuba Szczodrzyński 2021-10-23.
  -->

<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingHorizontal="16dp"
            android:paddingTop="8dp">

            <include
                android:id="@+id/header"
                layout="@layout/note_dialog_header" />

            <LinearLayout
                android:id="@+id/noteListLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <include
                    layout="@layout/note_dialog_subtitle"
                    app:text="@{@string/notes_list_dialog_title}" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/noteList"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:clipToPadding="false"
                    tools:itemCount="3"
                    tools:listitem="@layout/note_list_item" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/noData"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="8dp"
                android:orientation="vertical"
                android:paddingTop="16dp"
                android:paddingBottom="8dp"
                android:visibility="gone"
                tools:visibility="gone">

                <androidx.appcompat.widget.AppCompatTextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:drawablePadding="16dp"
                    android:fontFamily="sans-serif-light"
                    android:gravity="center"
                    android:text="@string/notes_no_data"
                    android:textSize="24sp"
                    app:drawableTopCompat="@drawable/ic_note" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:gravity="center"
                    android:text="@string/notes_no_data_hint"
                    android:textStyle="italic" />
            </LinearLayout>
        </LinearLayout>
    </androidx.core.widget.NestedScrollView>
</layout>
