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

    <data>

        <import type="android.view.View" />
        <import type="it.integry.integrywmsnative.core.utility.UtilityString" />
        <import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />

        <variable
            name="item"
            type="it.integry.integrywmsnative.core.model.MtbAart" />
    </data>


    <androidx.appcompat.widget.LinearLayoutCompat
        android:id="@+id/linearLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        android:background="?attr/selectableItemBackground">


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


            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@{item.codMart}"
                android:textColor="@color/colorPrimary"
                android:textSize="14sp"
                android:textStyle="bold"
                tools:text="COD MART" />

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:text="@{item.diacod}"
                android:textColor="@color/red_600"
                android:textSize="14sp"
                android:textStyle="bold"
                android:visibility="@{UtilityString.isNullOrEmpty(item.diacod) ? View.GONE : View.VISIBLE}"
                tools:text="DIACOD" />
        </RelativeLayout>


        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:text="@{item.descrizioneEstesa}"
            android:textColor="@android:color/black"
            android:textSize="16sp"
            tools:text="Descrizione lunga articolo" />


    </androidx.appcompat.widget.LinearLayoutCompat>


</layout>