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

    <variable
        name="item"
        type="es.verdnatura.presentation.view.feature.delivery.model.RouteInfo" />
</data>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">
    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:id="@+id/headerRouteLayout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            android:background="@color/verdnatura_black_9">


            <TextView
                android:id="@+id/headerRoute"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="1dp"
                android:paddingStart="5dp"
                android:paddingEnd="5dp"
                android:textColor="@color/verdnatura_white"
                android:background="@color/verdnatura_pumpkin_orange"
                android:text="@string/header"

                >

            </TextView>
        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            android:background="@color/verdnatura_black_1">



            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:paddingTop="1dp"
                android:paddingStart="5dp"
                android:paddingEnd="5dp"
                android:layout_marginBottom="5dp"
                >
                <LinearLayout
                    android:id="@+id/lateralLayout"
                    android:layout_width="5dp"
                    android:layout_height="match_parent"
                    android:background="@color/verdnatura_warm_grey"
                    android:orientation="horizontal"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"/>

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="8dp"
                    android:layout_marginStart="8dp"
                    android:orientation="vertical"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/linearLayout"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <TextView
                        android:id="@+id/textDriver"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@{item.driver}"
                        android:textSize="16sp"
                        android:textColor="@color/verdnatura_white" />

                    <TextView
                        android:id="@+id/textRoute"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@{String.valueOf(item.id)}"
                        android:textSize="16sp"
                        android:textColor="@color/verdnatura_white" />

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

                        <TextView
                            android:id="@+id/textHour"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginEnd="5dp"
                            android:text="@string/hour"
                            android:textColor="@color/verdnatura_brown_grey" />

                        <TextView
                            android:id="@+id/hour"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="@{item.hour}"
                            android:textColor="@color/verdnatura_white" />

                    </LinearLayout>


                    <TextView
                        android:id="@+id/textZone"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@{item.name}"
                        android:textColor="@color/verdnatura_white"
                        android:textSize="18sp" />

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

                        <TextView
                            android:id="@+id/textPalletNumber"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginEnd="5dp"
                            android:text="@string/namePallet"
                            android:textColor="@color/verdnatura_brown_grey" />

                        <TextView
                            android:id="@+id/palletNumber"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:text="@{item.numberPlate}"
                            android:textColor="@color/verdnatura_white" />
                    </LinearLayout>

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

                        <TextView
                            android:id="@+id/txtM3"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginEnd="5dp"
                            android:text="@string/m3"
                            android:textColor="@color/verdnatura_brown_grey" />

                        <TextView
                            android:id="@+id/M3"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:text="@{String.valueOf(item.m3)}"
                            android:textColor="@color/verdnatura_white" />
                    </LinearLayout>


                </LinearLayout>

                <LinearLayout
                    android:id="@+id/linearLayout"
                    android:layout_width="104dp"
                    android:layout_height="132dp"
                    android:gravity="center"
                    android:orientation="vertical"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                        <ImageView
                            android:id="@+id/imageLoadVan"
                            android:layout_width="match_parent"
                            android:layout_height="30dp"
                            android:layout_marginTop="0dp"
                            android:layout_marginBottom="@dimen/delivery_padding"
                            android:tooltipText="Permite escanear expediciones a cargar en la furgoneta"
                            app:srcCompat="@drawable/camion"
                            android:contentDescription="@string/loadRoute"/>

                        <TextView
                            android:id="@+id/loadVanTxt"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="center"
                            android:paddingTop="@dimen/delivery_padding"
                            android:paddingBottom="@dimen/delivery_padding"
                            android:text="@string/scannerDelivery"
                            android:textColor="@color/colorPrimary" />



                        <ImageView
                            android:id="@+id/showTickets"
                            android:layout_width="match_parent"
                            android:layout_height="30dp"
                            app:srcCompat="@drawable/ic_ticket_action"
                            android:layout_marginTop="0dp"
                            android:tooltipText="Permite escanear expediciones a cargar en la furgoneta"
                            android:layout_marginBottom="@dimen/delivery_padding"
                            android:contentDescription="@string/tickets"
                            />

                        <TextView
                            android:id="@+id/showTicketsTxt"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="center"

                            android:text="@string/showTickets"
                            android:textColor="@color/colorPrimary"/>

                </LinearLayout>
            </androidx.constraintlayout.widget.ConstraintLayout>
        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
    </LinearLayout>
</layout>