<?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.view.dialogs.available_items.DialogAvailableItemListModel" />
    </data>


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


        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/cod_mart_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_toStartOf="@id/already_inventariato"
            android:text="@{item.codMart}"
            android:textColor="@color/colorPrimary"
            android:textSize="14sp"
            android:textStyle="bold"
            android:layout_marginTop="8dp"
            tools:text="COD MART" />

        <RelativeLayout
            android:id="@+id/already_inventariato"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_marginTop="4dp"
            android:orientation="horizontal"
            android:visibility="@{item.aggiunto ? View.VISIBLE : View.GONE}">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/already_inventariato_text"
                style="@style/AppTheme.NewMaterial.Text.ExtraSmall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginStart="-12dp"
                android:layout_toEndOf="@id/already_inventariato_icon"
                android:paddingEnd="4dp"
                android:background="@drawable/badge_round_corner_without_padding"
                android:backgroundTint="@color/green_800"
                android:gravity="center_vertical"
                android:paddingStart="12dp"
                android:text="Aggiunto"
                android:textColor="@android:color/white" />

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/already_inventariato_icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:src="@drawable/ic_verified_account__green_800" />

        </RelativeLayout>


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


    </RelativeLayout>


</layout>