<?xml version="1.0" encoding="utf-8"?>

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

    <data>

        <import type="android.text.Html" />

        <import type="it.integry.integrywmsnative.R" />

        <variable
            name="mContext"
            type="android.content.Context" />

        <import type="android.view.View" />

        <variable
            name="view"
            type="it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLU" />

        <variable
            name="viewModel"
            type="it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialogViewModel" />
    </data>

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:orientation="vertical"
        app:cardBackgroundColor="@android:color/transparent"
        app:cardCornerRadius="24dp"
        app:cardElevation="0dp">

        <androidx.cardview.widget.CardView
            android:id="@+id/base"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:orientation="vertical"
            app:cardBackgroundColor="@color/light_blue_300"
            app:cardCornerRadius="24dp"
            app:cardElevation="0dp">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="4dp"
                android:padding="24dp"
                android:background="@drawable/dialog_card_child_bg">


                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/title_text"
                    style="@style/TextViewMaterial.Dialog.HeadlineText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal"
                    android:text="@string/lu_info"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/input_cod_tcol"
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    app:layout_constraintTop_toBottomOf="@id/title_text"
                    app:layout_constraintBottom_toTopOf="@id/level_number_layout"
                    android:visibility="@{viewModel.tipiCollo.empty ? View.GONE : View.VISIBLE}"
                    android:hint="@string/lu_type">

                    <androidx.appcompat.widget.AppCompatAutoCompleteTextView
                        android:id="@+id/filled_exposed_dropdown_cod_tcol"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:imeOptions="actionNext"
                        android:inputType="textNoSuggestions"
                        android:nextFocusForward="@id/filled_exposed_dropdown_cod_jfas"
                        app:binding="@{view.selectedMtbTcol}"
                        android:singleLine="true" />


                </com.google.android.material.textfield.TextInputLayout>

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/level_number_layout"
                    style="@style/TextInputLayout.OutlinePrimary"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    app:layout_constraintTop_toBottomOf="@id/input_cod_tcol">

                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/additional_notes_text"
                        style="@style/TextInputEditText.OutlinePrimary"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/hint_additional_notes"
                        app:binding="@{view.additionalNotes}"
                        android:inputType="text" />

                </com.google.android.material.textfield.TextInputLayout>


                <com.google.android.material.button.MaterialButton
                    android:id="@+id/button_confirm"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:text="@string/confirm"
                    android:layout_marginTop="24dp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/level_number_layout" />


            </androidx.constraintlayout.widget.ConstraintLayout>
        </androidx.cardview.widget.CardView>
    </androidx.cardview.widget.CardView>

</layout>