<?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.Sale" />
    </data>

    <LinearLayout
        android:id="@+id/linear_main"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/layout_margin_1"
        android:layout_marginBottom="@dimen/layout_margin_min"
        android:orientation="vertical"

        >
        <!--CABECERA=================================================-->
        <LinearLayout
            android:id="@+id/item_row_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/rvHeadlines"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:visibility="visible" />

            <LinearLayout

                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/verdnatura_white"
                android:orientation="horizontal"
                android:padding="@dimen/layout_margin_min"
                android:textColor="@color/verdnatura_black">


                <TextView
                    android:id="@+id/levelTxt"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="@dimen/layout_margin_minest"
                    android:text="@string/level"
                    android:textColor="@color/verdnatura_black"
                    android:textSize="@dimen/h8" />

                <TextView
                    android:id="@+id/level"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="@dimen/layout_margin_minest"
                    android:text="@{sale.level}"
                    android:textColor="@color/verdnatura_black"
                    android:textSize="@dimen/h8"
                    android:textStyle="bold"
                    tool:text="2" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="@dimen/layout_margin_minest"
                    android:text="@string/ticketAbb"
                    android:textColor="@color/verdnatura_black"
                    android:textSize="@dimen/h8" />

                <TextView
                    android:id="@+id/ticketFk"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@{Integer.toString(sale.ticketFk)}"
                    android:textColor="@color/verdnatura_black"
                    android:textSize="@dimen/h8"
                    android:textStyle="bold"
                    tool:text="123456789"

                    />

                <View
                    android:id="@+id/item_ticket_color"
                    android:layout_width="@dimen/semaforo_next_to_ticket"
                    android:layout_height="@dimen/semaforo_next_to_ticket"
                    android:layout_gravity="center"
                    android:layout_marginStart="1dp"
                    android:background="@drawable/background_and_round_collection_fragment" />


                <TextView
                    android:id="@+id/previous"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/layout_margin_minest"
                    android:text=""
                    android:textColor="@color/verdnatura_black"
                    android:textSize="@dimen/h9"
                    android:textStyle="bold"
                    tool:text="PREV:"

                    />

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

                    <ImageView
                        android:id="@+id/ivArrow"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:layout_alignParentEnd="true"
                        android:layout_marginEnd="20dp"
                        android:contentDescription="@string/previousCollected"
                        android:rotation="180"
                        android:src="@drawable/ic_arrow_down" />

                    <ImageView
                        android:id="@+id/imageErrorMessage"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_alignParentEnd="true"
                        android:contentDescription="@string/error"
                        app:srcCompat="@drawable/emoticon_error_fragment" />


                </RelativeLayout>


            </LinearLayout>


        </LinearLayout>

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

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/content_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@color/verdnatura_black"
                android:paddingTop="@dimen/layout_margin_min"
                android:paddingBottom="@dimen/layout_margin_min">
                <!--SEMAFORO=================================================-->


                <LinearLayout
                    android:id="@+id/infoSale"
                    android:layout_width="240dp"
                    android:layout_height="match_parent"
                    android:orientation="vertical"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <LinearLayout
                        android:id="@+id/linearLayoutItem"
                        android:layout_width="wrap_content"
                        android:layout_height="25dp"
                        android:orientation="vertical"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent">

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/layout_margin_prepicker">

                            <TextView
                                android:id="@+id/item_parking_code"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="1dp"
                                android:layout_marginEnd="@dimen/layout_margin_min"
                                android:layout_weight="0.5"
                                android:maxLines="1"
                                android:text=""
                                android:textColor="@color/verdnatura_white"
                                android:textSize="@dimen/bodyPicker"
                                android:textStyle="bold"
                                tool:text="A-01-1" />


                            <TextView
                                android:id="@+id/item_first_to_picker"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginEnd="1dp"
                                android:layout_weight="0.5"
                                android:gravity="end"
                                android:textColor="@color/verdnatura_white"
                                android:textSize="@dimen/body1"
                                android:textStyle="bold"
                                android:visibility="invisible"
                                tool:text="25 x 5" />


                        </LinearLayout>
                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/linearLayoutLongItem"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/layout_margin_prepicker"
                        android:orientation="vertical"
                        app:layout_constraintTop_toBottomOf="@+id/linearLayoutItem">

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

                            <TextView
                                android:id="@+id/item_code"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="@dimen/layout_margin_min_to_modify"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:text="@{sale.code}"
                                android:textColor="@color/verdnatura_white"
                                android:textSize="@dimen/bodyPicker"
                                tool:text="ABC" />

                            <TextView
                                android:id="@+id/item_second_to_picker"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"

                                android:gravity="end"
                                android:textColor="@color/verdnatura_white"
                                android:textSize="@dimen/body2"
                                android:textStyle="bold"
                                android:visibility="invisible"
                                tool:text="5 x 5" />

                        </LinearLayout>
                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/linearLayoutItemOrigin"
                        android:layout_width="match_parent"
                        android:layout_height="25dp"
                        android:orientation="vertical"
                        app:layout_constraintTop_toBottomOf="@+id/linearLayoutLongItem">

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/layout_margin_prepicker">

                            <TextView
                                android:id="@+id/item_article_itemFkNew"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="@dimen/layout_margin_min_to_modify"
                                android:layout_weight="2"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:text="@{Long.toString(sale.itemFk)}"
                                android:textColor="@color/verdnatura_white"
                                android:textSize="@dimen/bodyPicker"
                                tool:text="123456" />

                            <TextView
                                android:id="@+id/item_article_colour"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="@dimen/layout_margin_min_to_modify"
                                android:layout_weight="2"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:text="@{sale.color}"
                                android:textColor="@color/verdnatura_white"
                                android:textSize="@dimen/bodyPicker"
                                tool:text="123456" />

                            <TextView
                                android:id="@+id/item_article_first_accumulate"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_weight="0.5"
                                android:gravity="start"
                                android:textColor="@color/verdnatura_brown_grey"
                                android:textSize="@dimen/body2"
                                android:textStyle="bold"
                                android:visibility="invisible"
                                tool:text="5 x 5" />

                            <TextView
                                android:id="@+id/item_reserved_total_number"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_weight="0.5"
                                android:gravity="end"
                                android:textColor="@color/verdnatura_brown_grey"
                                android:textSize="@dimen/body2"
                                android:textStyle="bold"
                                android:visibility="invisible"
                                tool:text="5 x 5" />


                        </LinearLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/linearLayoutItemColor"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/layout_margin_prepicker"
                        android:orientation="vertical"
                        app:layout_constraintTop_toBottomOf="@+id/linearLayoutItemOrigin">

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

                            <TextView
                                android:id="@+id/item_article_long_info"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="@dimen/layout_margin_min_to_modify"
                                android:layout_weight="2"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:text="@{sale.longName}"
                                android:textColor="@color/verdnatura_white"
                                android:textSize="@dimen/bodyPicker"
                                tool:text="RS Rosa Palo" />

                            <TextView
                                android:id="@+id/item_article_second_accumulate"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_weight="0.5"
                                android:gravity="start"
                                android:textColor="@color/verdnatura_brown_grey"
                                android:textSize="@dimen/body2"
                                android:textStyle="bold"
                                android:visibility="invisible"
                                tool:text="5 x 5" />

                            <TextView
                                android:id="@+id/item_reserved_number"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_weight="0.5"
                                android:gravity="end"
                                android:textColor="@color/verdnatura_brown_grey"
                                android:textSize="@dimen/body2"
                                android:textStyle="bold"
                                android:visibility="invisible"
                                tool:text="5 x 5" />

                        </LinearLayout>

                    </LinearLayout>


                </LinearLayout>

                <LinearLayout
                    android:id="@+id/linearLayoutRight"
                    android:layout_width="wrap_content"
                    android:layout_height="50dp"
                    android:layout_marginStart="5dp"
                    android:orientation="vertical"
                    app:layout_constraintEnd_toStartOf="@+id/linearLayoutColor"
                    app:layout_constraintTop_toTopOf="parent">

                    <TextView
                        android:id="@+id/packingTopicker"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="end"
                        android:textColor="@color/verdnatura_white"
                        android:textSize="26sp"
                        app:layout_constraintTop_toTopOf="parent">

                    </TextView>

                </LinearLayout>

                <LinearLayout
                    android:id="@+id/linearLayoutDown"
                    android:layout_width="150dp"
                    android:layout_height="0dp"
                    android:layout_marginStart="50dp"
                    android:orientation="horizontal"
                    app:layout_constraintEnd_toStartOf="@+id/linearLayoutColor"
                    app:layout_constraintTop_toBottomOf="@+id/linearLayoutRight"
                    tool:layout_editor_absoluteY="4dp">

                    <TextView
                        android:id="@+id/selectToPicker"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:gravity="start"
                        android:textColor="@color/verdnatura_white"
                        android:textSize="21sp"
                        tools:text="11/22">

                    </TextView>

                    <TextView
                        android:id="@+id/quantityReserved"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginEnd="5dp"
                        android:layout_weight="0.4"
                        android:gravity="end"
                        android:textColor="@color/verdnatura_white"
                        android:textSize="21sp"
                        tool:text="2000/3000">

                    </TextView>

                </LinearLayout>

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


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

                    <View
                        android:id="@+id/item_ticketColors"
                        android:layout_width="@dimen/semaforo_width"
                        android:layout_height="@dimen/ticketColor_height"
                        android:layout_marginBottom="1dp"
                        android:background="@drawable/border"
                        android:visibility="invisible" />

                </LinearLayout>

            </androidx.constraintlayout.widget.ConstraintLayout>

        </LinearLayout>

        <LinearLayout
            android:id="@+id/layout_error"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone">

            <TextView
                android:id="@+id/txt_error"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/verdnatura_red"
                android:textColor="@color/verdnatura_white"
                tool:text="Cantidad original 100" />
        </LinearLayout>

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

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/item_article_placements"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/verdnatura_background_item_picker"
            android:clipToPadding="false"
            android:visibility="gone"
            tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:listitem="@layout/item_placement_row"
            tools:orientation="horizontal" />
    </LinearLayout>
</layout>