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

    <data>

        <variable
            name="sale"
            type="es.verdnatura.presentation.view.feature.sacador.model.SaleVO" />
    </data>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_marginBottom="@dimen/layout_margin_min"
      >
        <!--CABECERA=================================================-->
        <LinearLayout
            android:id="@+id/item_row_layout"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/verdnatura_black_5">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/verdnatura_warm_grey"
                android:padding="@dimen/layout_margin_min"
                android:orientation="vertical">

                <LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/verdnatura_white"
                        android:text="@string/Nivel"
                        android:textSize="@dimen/h8"
                        android:layout_marginRight="@dimen/layout_margin_min"/>
                    <TextView
                        android:id="@+id/level"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/verdnatura_white"
                        android:text="@{sale.level}"
                        tool:text="2"
                        android:textStyle="bold"
                        android:textSize="@dimen/h8"
                        android:layout_marginRight="@dimen/layout_margin_min"/>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/verdnatura_white"
                        android:text="@string/Ticket"
                        android:textSize="@dimen/h8"
                        android:layout_marginRight="@dimen/layout_margin_min"/>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/verdnatura_white"
                        android:text="@{sale.ticketFk}"
                        tool:text="123456789"
                        android:textStyle="bold"
                        android:textSize="@dimen/h8"

                        />

                    <RelativeLayout
                        android:orientation="horizontal"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"

                        >

                        <ImageView
                            android:id="@+id/imageErrorMessage"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:layout_alignParentRight="true"
                            app:srcCompat="@drawable/emoticon_error" />
                    </RelativeLayout>

                </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/verdnatura_white"
                        android:text="@{sale.agencyName}"
                        tool:text="MRW"
                        android:textStyle="bold"
                        android:textSize="@dimen/h8"
                        android:layout_marginRight="@dimen/layout_margin_min"
                        android:visibility="gone"/>
                </LinearLayout>
            </LinearLayout>


        </LinearLayout>
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/content_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="@dimen/layout_margin_min"
            android:paddingBottom="@dimen/layout_margin_min"
            android:background="@color/verdnatura_black">
            <!--SEMAFORO=================================================-->
            <LinearLayout
                android:id="@+id/linearLayout3"
                android:layout_width="@dimen/semaforo_width"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                >

                <View
                    android:id="@+id/item_article_row_semaforo_pre"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/semaforo_height"
                    android:background="@color/verdnatura_warm_grey"
                    android:layout_marginBottom="1dp"/>

                <View
                    android:id="@+id/item_article_row_semaforo_sac"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/semaforo_height"
                    android:background="@color/verdnatura_warm_grey"
                    android:layout_marginBottom="1dp"/>

                <View
                    android:id="@+id/item_article_row_semaforo_con"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/semaforo_height"
                    android:background="@color/verdnatura_warm_grey" />

            </LinearLayout>

            <!--CONTENIDO=================================================-->
            <!--app:layout_constraintEnd_toStartOf="@+id/item_article_quantity_picked"-->

            <TextView
                android:id="@+id/item_article_itemFk"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/layout_margin_min"
                android:layout_marginEnd="@dimen/layout_margin_min"
                android:text="@{sale.itemFk}"
                tool:text="85478"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/h6"
                android:textStyle="bold"
                    app:layout_constraintStart_toEndOf="@+id/linearLayout3"
                app:layout_constraintTop_toTopOf="parent"
                android:maxLines="1"/>
            <TextView
                android:id="@+id/item_packing_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="30dp"
                android:layout_marginEnd="@dimen/layout_margin_min"
                android:paddingTop="2dp"
                android:text="En balda:"
                tool:text="En balda:"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/h7"
                android:textStyle="bold"
                app:layout_constraintEnd_toStartOf="@+id/item_packing_itemFk"
                app:layout_constraintStart_toEndOf="@+id/item_article_itemFk"
                app:layout_constraintTop_toTopOf="parent"
                android:maxLines="1"/>
            <TextView
                android:id="@+id/item_packing_itemFk"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="1dp"
                android:layout_marginEnd="@dimen/layout_margin_min"
                android:text="@{sale.packingShelve}"
                tool:text="Number"
                android:paddingTop="2dp"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/h7"
                android:textStyle="bold"
                app:layout_constraintEnd_toStartOf="@+id/item_article_quantity_picked"
                app:layout_constraintStart_toEndOf="@+id/item_packing_text"
                app:layout_constraintTop_toTopOf="parent"
                android:maxLines="1"/>
            <TextView
                android:id="@+id/item_article_quantity_picked"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/layout_margin_min"
                android:text="@{sale.pickedQuantity}"
                tool:text="0"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/h6"
                android:textStyle="bold"
                app:layout_constraintEnd_toStartOf="@+id/txtde"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/txtde"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/layout_margin_min"
                android:text="@string/de"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/h6"
                app:layout_constraintEnd_toStartOf="@+id/item_article_quantity"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/item_article_quantity"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/layout_margin_1"
                android:text="@{sale.quantity}"
                tool:text="10"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/h6"
                android:paddingLeft="10dp"
                android:paddingRight="10dp"
                android:textStyle="bold"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                />

            <TextView
                android:id="@+id/item_article_quantity_line1"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/layout_margin_min"
                android:ellipsize="end"
                android:maxLines="1"
                android:text="@{sale.line1}"
                tool:text="información de la linea 1"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/body2"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/linearLayout3"
                app:layout_constraintTop_toBottomOf="@+id/item_article_itemFk"
                />

            <TextView
                android:id="@+id/item_article_cel1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/layout_margin_1"
                android:text="@{sale.cel1}"
                tool:text="cel1"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/body2"
                android:textStyle="bold"
                app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line1"
                app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line1" />





            <TextView
                android:id="@+id/item_article_quantity_line2"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/layout_margin_min"
                android:ellipsize="end"
                android:maxLines="1"
                android:text="@{sale.line2}"
                tool:text="información de la linea 2"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/body2"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/linearLayout3"
                app:layout_constraintTop_toBottomOf="@+id/item_article_quantity_line1" />


            <TextView
                android:id="@+id/item_article_cel2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/layout_margin_1"
                android:text="@{sale.cel2}"
                tool:text="cel2"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/body2"
                android:textStyle="bold"
                app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line2"
                app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2" />




            <TextView
                android:id="@+id/item_article_quantity_line3"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/layout_margin_1"
                android:ellipsize="end"
                android:maxLines="1"
                android:text="@{sale.line3}"
                tool:text="información de la linea 3"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/body2"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/linearLayout3"
                app:layout_constraintTop_toBottomOf="@+id/item_article_quantity_line2" />


            <TextView
                android:id="@+id/item_article_cel3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/layout_margin_1"
                android:text="@{sale.cel3}"
                tool:text="cel3"
                android:textColor="@color/verdnatura_white"
                android:textSize="@dimen/body2"
                android:textStyle="bold"
                app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line3"
                app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line3" />

            <LinearLayout
                android:id="@+id/linearLayoutColor"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                >

                <View
                    android:id="@+id/item_ticketColor"
                    android:layout_width="5dp"
                    android:layout_height="@dimen/ticketColor_height"
                    android:background="@drawable/border"
                    android:layout_marginBottom="1dp"/>



            </LinearLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>
        <LinearLayout
            android:id="@+id/layout_error"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <TextView
                android:id="@+id/txt_error"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/verdnatura_white"
                android:background="@color/verdnatura_red"
                tool:text="Cantidad original 100"/>
        </LinearLayout>
        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/item_article_placements"
            android:clipToPadding="false"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:listitem="@layout/item_placement_row"
            android:background="@color/verdnatura_black_3"
            tools:orientation="horizontal"/>
    </LinearLayout>
</layout>