<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <data>
        <variable
            name="view"
            type="it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView" />
    </data>

    <androidx.cardview.widget.CardView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/base_root"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        app:cardCornerRadius="12dp"
        app:cardElevation="0dp">

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

            <RelativeLayout
                android:id="@+id/title_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/light_blue_300"
                android:gravity="center_horizontal">

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/title_icon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/ic_error_white_24dp"
                    android:layout_margin="24dp"/>

            </RelativeLayout>


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingTop="24dp"
                android:paddingBottom="16dp"
                android:paddingStart="8dp"
                android:paddingEnd="8dp">



                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingStart="16dp"
                    android:paddingEnd="16dp">

                    <TextView
                        android:id="@+id/title_text"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        style="@style/TextViewMaterial.DialogTitle"
                        android:text="@string/title_open_lu"
                        android:gravity="center_horizontal"/>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_marginTop="16dp">


                        <ProgressBar
                            android:id="@+id/progressBar"
                            style="?android:attr/progressBarStyle"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"/>

                        <androidx.appcompat.widget.AppCompatTextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:textSize="16sp"
                            android:layout_marginStart="8dp"
                            android:layout_marginEnd="12dp"
                            android:layout_gravity="center_vertical"
                            android:gravity="center_horizontal"
                            style="@style/TextViewMaterial"
                            android:text="Scansiona il codice a barre di una UL"/>
                    </LinearLayout>



                </LinearLayout>




                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/dialog_scan_or_create_lu__creation_layout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:visibility="@{view.creationEnabled}">



                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent">


                        <androidx.appcompat.widget.AppCompatTextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="center_horizontal"
                            android:layout_marginTop="12dp"
                            android:layout_marginBottom="12dp"
                            android:textSize="16sp"
                            android:textStyle="bold"
                            android:layout_gravity="center_horizontal"
                            style="@style/TextViewMaterial"
                            android:text="OPPURE" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/create_new_lu_button"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            style="@style/Button.PrimaryFull"
                            android:layout_marginLeft="8dp"
                            android:layout_marginRight="8dp"
                            android:text="@string/button_create_new_ul"/>
                    </LinearLayout>

                </androidx.constraintlayout.widget.ConstraintLayout>




                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/dialog_scan_or_create_lu__basket_layout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:visibility="@{view.basketEnabled}">



                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent">


                        <androidx.appcompat.widget.AppCompatTextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="center_horizontal"
                            android:layout_marginTop="12dp"
                            android:layout_marginBottom="12dp"
                            android:textSize="16sp"
                            android:textStyle="bold"
                            android:layout_gravity="center_horizontal"
                            style="@style/TextViewMaterial"
                            android:text="OPPURE" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/view_basket"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            style="@style/Button.PrimaryOutline"
                            android:layout_marginLeft="8dp"
                            android:layout_marginRight="8dp"
                            android:text="@string/button_view_basket_ul"
                            app:iconSize="24dp"
                            app:icon="@drawable/ic_black_shopping_cart"/>
                    </LinearLayout>

                </androidx.constraintlayout.widget.ConstraintLayout>




            </LinearLayout>


        </LinearLayout>


    </androidx.cardview.widget.CardView>


</layout>