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

    <data>

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

        <variable
            name="viewmodel"
            type="it.integry.integrywmsnative.gest.inventario.ElencoInventariViewModel" />
    </data>

    <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:context=".gest.inventario.ElencoInventariFragment">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/empty_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:alpha="0.3"
            android:visibility="gone">

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guideline_empty_top"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintGuide_percent="0.2" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guideline_empty_left"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.15" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guideline_empty_right"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.85" />

            <androidx.appcompat.widget.LinearLayoutCompat
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:gravity="center_horizontal"
                android:orientation="vertical"
                app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
                app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
                app:layout_constraintTop_toTopOf="@id/guideline_empty_top">

                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="72dp"
                    android:layout_height="wrap_content"
                    android:adjustViewBounds="true"
                    android:src="@drawable/ic_playlist_add_check_24dp" />

                <androidx.appcompat.widget.AppCompatTextView
                    style="@style/AppTheme.NewMaterial.Text.Medium"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal"
                    android:text="@string/no_inventory_available_text" />
            </androidx.appcompat.widget.LinearLayoutCompat>

        </androidx.constraintlayout.widget.ConstraintLayout>


        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/inventario_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fadeScrollbars="true"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            tools:itemCount="8"
            tools:listitem="@layout/fragment_elenco_inventario_list_single_item" />



        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="16dp"
            app:srcCompat="@drawable/ic_add_24dp"
            app:singleClick="@{() -> viewmodel.openInventario()}"
            style="?attr/floatingActionButtonPrimaryStyle" />


    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>