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

        <import type="android.view.View" />
        <import type="android.text.Html" />
        <import type="java.time.LocalDateTime" />
        <import type="it.integry.integrywmsnative.R" />
        <import type="it.integry.integrywmsnative.core.di.BindableBoolean" />
        <import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
        <import type="it.integry.integrywmsnative.core.utility.UtilityString" />

        <variable
            name="item"
            type="it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dto.ProdFabbisognoLineeItemModelDto" />

    </data>

    <androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="2dp"
        android:paddingEnd="4dp"
        android:paddingVertical="2dp"
        android:orientation="horizontal">

        <View
            android:id="@+id/empty_view"
            android:layout_width="8dp"
            android:layout_height="match_parent" />

        <androidx.appcompat.widget.LinearLayoutCompat
            android:id="@+id/ordine_lavorazione_main_list_group_item_container_root"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="3dp"
            android:layout_marginEnd="3dp"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:paddingStart="2dp"
            android:paddingEnd="8dp"
            android:background="@color/full_white">

            <CheckBox
                android:id="@+id/checkbox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:focusable="false"
                android:clickable="false"
                app:checked="@{item.selected}"/>

            <RelativeLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true">

<!--                <androidx.appcompat.widget.AppCompatTextView-->
<!--                    android:id="@+id/right_descrizione"-->
<!--                    android:background="@drawable/badge_round_corner"-->
<!--                    android:backgroundTint="@color/colorPrimary"-->
<!--                    android:textColor="@android:color/white"-->
<!--                    android:textStyle="bold"-->
<!--                    android:paddingLeft="8dp"-->
<!--                    android:paddingTop="2dp"-->
<!--                    android:paddingRight="8dp"-->
<!--                    android:paddingBottom="2dp"-->
<!--                    android:layout_width="wrap_content"-->
<!--                    android:layout_height="wrap_content"-->
<!--                    android:text="@{item.getDescrizioneAttivita()}"-->
<!--                    tools:text="PRODUZIONE PASTA SECCA"-->
<!--                    android:layout_alignParentEnd="true"-->
<!--                    style="@style/AppTheme.NewMaterial.Text.Small" />-->

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/descrizione"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@{Html.fromHtml(context.getString(R.string.doc_testata, item.getOrdineLavorazioneDTO().numOrd, UtilityDate.formatDate(item.getOrdineLavorazioneDTO().dataOrd, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)))}"
                    tools:text="n. 39 del 27 ott 2017"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textColor="#000"
                    android:layout_marginTop="4dp"
                    android:layout_alignParentStart="true"
                    style="@style/AppTheme.NewMaterial.Text.Small"
                    android:layout_toStartOf="@id/descrizione"/>

<!--                <androidx.appcompat.widget.AppCompatTextView-->
<!--                    android:id="@+id/right_sub_descrizione"-->
<!--                    android:layout_width="wrap_content"-->
<!--                    android:layout_height="wrap_content"-->
<!--                    android:layout_marginTop="4dp"-->
<!--                    android:background="@drawable/badge_round_corner"-->
<!--                    android:backgroundTint="@color/red_400"-->
<!--                    android:layout_marginStart="8dp"-->
<!--                    android:paddingLeft="8dp"-->
<!--                    android:paddingTop="2dp"-->
<!--                    android:paddingRight="8dp"-->
<!--                    android:paddingBottom="2dp"-->
<!--                    android:textColor="@android:color/white"-->
<!--                    android:textStyle="bold"-->
<!--                    android:text="@{item.getCodJfas()}"-->
<!--                    tools:text="SL01"-->
<!--                    android:layout_alignParentEnd="true"-->
<!--                    android:layout_below="@id/descrizione"-->
<!--                    style="@style/AppTheme.NewMaterial.Text.Small" />-->

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/sub_descrizione"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLines="1"
                    android:ellipsize="end"
                    android:text="@{item.getOrdineLavorazioneDTO().descrizioneProd}"
                    tools:text="BUCATINI P13,5EPA T.60623/24"
                    style="@style/AppTheme.NewMaterial.Text.Small"
                    android:layout_below="@+id/descrizione"
                    android:layout_toStartOf="@id/right_sub_descrizione"/>

            </RelativeLayout>
        </androidx.appcompat.widget.LinearLayoutCompat>

    </androidx.appcompat.widget.LinearLayoutCompat>


</layout>