<?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>

        <variable
            name="item"
            type="es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking" />
    </data>

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

        <LinearLayout
            android:id="@+id/item_row_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/verdnatura_black_5"
            android:orientation="horizontal"
            android:paddingLeft="@dimen/pasilleros_margin_main_menu"
            android:paddingTop="@dimen/inventory_item"
            android:paddingRight="@dimen/inventory_item"
            android:paddingBottom="@dimen/inventory_item">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginRight="@dimen/layout_margin_min"
                android:layout_weight="1"
                android:gravity="center"
                android:orientation="horizontal">

                <androidx.cardview.widget.CardView
                    android:layout_width="@dimen/item_image_width"
                    android:layout_height="@dimen/item_image_width"
                    android:layout_marginRight="@dimen/layout_margin_1"
                    app:cardCornerRadius="100dp">

                    <ImageView
                        android:id="@+id/img_item"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" />
                </androidx.cardview.widget.CardView>

                <LinearLayout
                    android:id="@+id/namelayout"
                    style="@style/LayoutClickable"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">


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

                        <TextView
                            android:id="@+id/item_parking"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:text="@{item.parking}"
                            android:textColor="@color/verdnatura_white"
                            android:textSize="@dimen/h8"
                            android:textStyle="bold" />

                        <TextView
                            android:id="@+id/item_shelving"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:text="@{item.shelvingFk}"
                            android:textColor="@color/verdnatura_white"
                            android:textSize="@dimen/h8"
                            android:textStyle="bold" />
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">

                        <TextView
                            android:id="@+id/itemfk_text"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_weight="2"
                            android:text="@{Integer.toString(item.itemFk)}"
                            android:textColor="@color/verdnatura_white"
                            android:textSize="@dimen/h8"
                            android:textStyle="bold" />

                        <TextView
                            android:id="@+id/longname_text"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:text="@{item.longName}"
                            android:textColor="@color/verdnatura_white"
                            android:textSize="@dimen/h8" />
                    </LinearLayout>

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

                        <TextView
                            android:id="@+id/buyer_text"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:text="@{item.buyer}"
                            android:textColor="@color/verdnatura_white"
                            android:visibility="gone"
                            android:textSize="@dimen/h8" />
                    </LinearLayout>
                </LinearLayout>

            </LinearLayout>



        <LinearLayout
            android:id="@+id/layer_visible"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="6"
            android:orientation="vertical">

            <TextView
                android:id="@+id/visible_text"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:ellipsize="end"
                android:gravity="center"
                android:maxLines="1"
                android:text="@{Integer.toString(item.visible)}"
                android:textColor="@color/verdnatura_pumpkin_orange"
                android:textSize="@dimen/h6"
                android:textStyle="bold" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="@dimen/item_image_width_min"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:visibility="gone">

            <ImageView
                android:id="@+id/more_img"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="center"
                android:src="@drawable/ic_more_vert_black_24dp"
                android:visibility="gone" />
        </LinearLayout>
        </LinearLayout>

    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/verdnatura_black_9" />
    </LinearLayout>
</layout>
