<?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"
    xmlns:fab="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <data>

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

        <variable
            name="viewModel"
            type="it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleViewModel" />

        <variable
            name="view"
            type="it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleActivity" />

    </data>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/full_white"
            android:orientation="vertical">

            <it.integry.integrywmsnative.ui.ElevatedToolbar
                android:id="@+id/elevated_toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <androidx.appcompat.widget.Toolbar
                    android:id="@+id/toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="?actionBarSize"
                    app:popupTheme="@style/AppTheme.PopupOverlay"
                    tools:title="Contenuto bancale" />

            </it.integry.integrywmsnative.ui.ElevatedToolbar>

            <androidx.core.widget.NestedScrollView
                android:id="@+id/scroll_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:layout_behavior="@string/appbar_scrolling_view_behavior">


                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:focusableInTouchMode="true"
                    android:orientation="vertical"
                    android:paddingTop="8dp"
                    tools:context=".gest.contenuto_bancale.ContenutoBancaleActivity">


                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:layout_marginRight="8dp"
                        android:background="@drawable/gray_detail_background_round8"
                        android:orientation="vertical"
                        android:padding="16dp">

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

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="Data creazione: "
                                android:textColor="@android:color/black"
                                android:textSize="16sp" />

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="@{view.mtbColt.getDataColloHumanLong()}"
                                android:textColor="@android:color/black"
                                android:textSize="16sp"
                                android:textStyle="bold"
                                tools:text="22 ottobre 2018" />
                        </LinearLayout>

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

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="Preparato da "
                                android:textColor="@android:color/black" />

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="@{view.mtbColt.getPreparatoDa() != null ? view.mtbColt.getPreparatoDa() : `N/D`}"
                                android:textColor="@android:color/black"
                                android:textStyle="italic"
                                tools:text="Vito Falagario" />
                        </LinearLayout>

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

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="Posizione "
                                android:textColor="@android:color/black" />

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="@{view.mtbColt.getPosizione() != null ? view.mtbColt.getPosizione() : `N/D`}"
                                android:textColor="@android:color/black"
                                android:textStyle="bold"
                                tools:text="A00F00C00L00" />
                        </LinearLayout>

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

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="Deposito "
                                android:textColor="@android:color/black" />

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="@{view.mtbColt.getCodMdep()}"
                                android:textColor="@android:color/black"
                                android:textStyle="bold"
                                tools:text="10" />

                            <androidx.appcompat.widget.AppCompatTextView
                                style="@style/AppTheme.NewMaterial.Text.Small"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="4dp"
                                android:text="@{view.descrizioneDepo}"
                                android:textColor="@android:color/black"
                                android:textStyle="bold"
                                tools:text="(Bari)" />
                        </LinearLayout>


                    </LinearLayout>


                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/contenuto_bancale_main_list"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="16dp"
                        android:layout_marginBottom="92dp"
                        android:paddingStart="2dp"
                        android:paddingEnd="2dp">

                    </androidx.recyclerview.widget.RecyclerView>


                </LinearLayout>

            </androidx.core.widget.NestedScrollView>

        </LinearLayout>


        <com.github.clans.fab.FloatingActionMenu
            android:id="@+id/contenuto_bancale_fab"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:visibility="@{view.fabVisible}"
            fab:menu_animationDelayPerItem="50"
            fab:menu_backgroundColor="@color/white_bg_alpha"
            fab:menu_buttonSpacing="0dp"
            fab:menu_colorNormal="@color/colorSecondary"
            fab:menu_colorPressed="@color/colorSecondaryDark"
            fab:menu_fab_size="normal"
            fab:menu_labels_colorNormal="@color/white"
            fab:menu_labels_colorPressed="@color/white_pressed"
            fab:menu_labels_colorRipple="#66FFFFFF"
            fab:menu_labels_cornerRadius="3dp"
            fab:menu_labels_hideAnimation="@anim/fab_slide_out_to_right"
            fab:menu_labels_margin="0dp"
            fab:menu_labels_padding="8dp"
            fab:menu_labels_paddingBottom="4dp"
            fab:menu_labels_paddingLeft="8dp"
            fab:menu_labels_paddingRight="8dp"
            fab:menu_labels_paddingTop="4dp"
            fab:menu_labels_position="left"
            fab:menu_labels_showAnimation="@anim/fab_slide_in_from_right"
            fab:menu_labels_showShadow="true"
            fab:menu_labels_textColor="@color/black_semi_transparent"
            fab:menu_labels_textSize="18sp"
            fab:menu_openDirection="up"
            fab:menu_shadowColor="#66000000"
            fab:menu_shadowRadius="4dp"
            fab:menu_shadowXOffset="1dp"
            fab:menu_shadowYOffset="3dp"
            fab:menu_showShadow="true">

            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/accettazione_ordine_inevaso_fab_item1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:scaleX="-1"
                android:src="@drawable/ic_recover_ul_24dp"
                app:fab_colorNormal="@color/white"
                app:fab_colorPressed="@color/white_pressed"
                app:fab_colorRipple="#66FFFFFF"
                app:onClick="@{() -> view.recoverUL()}"
                app:visibility="@{view.recoverFabMenuVisible}"
                fab:fab_label="@string/action_recover_ul" />

            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/accettazione_ordine_inevaso_fab_item2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_print_24dp"
                app:fab_colorNormal="@color/white"
                app:fab_colorPressed="@color/white_pressed"
                app:fab_colorRipple="#66FFFFFF"
                app:onClick="@{() -> view.printUL()}"
                fab:fab_label="@string/action_print_ul" />

        </com.github.clans.fab.FloatingActionMenu>
    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>