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

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

    <data>

        <variable
            name="config"
            type="pl.szczodrzynski.edziennik.config.ProfileConfigUI" />
    </data>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="24dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/messages_config_compose"
                android:textAppearance="@style/NavView.TextView.Subtitle" />

            <com.google.android.material.checkbox.MaterialCheckBox
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:checked="@={config.messagesGreetingOnCompose}"
                android:minHeight="32dp"
                android:text="@string/messages_config_greeting_on_compose" />

            <com.google.android.material.checkbox.MaterialCheckBox
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:checked="@={config.messagesGreetingOnReply}"
                android:minHeight="32dp"
                android:text="@string/messages_config_greeting_on_reply" />

            <com.google.android.material.checkbox.MaterialCheckBox
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:checked="@={config.messagesGreetingOnForward}"
                android:minHeight="32dp"
                android:text="@string/messages_config_greeting_on_forward" />

            <com.google.android.material.textfield.TextInputLayout
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:hint="@string/messages_config_greeting_text">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/greetingText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textMultiLine|textShortMessage|textAutoCorrect|textAutoComplete"
                    android:minLines="3"
                    android:maxLines="10"
                    tools:text="\n\nZ poważaniem\nJan Kowalski" />
            </com.google.android.material.textfield.TextInputLayout>
        </LinearLayout>
    </ScrollView>
</layout>
