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

    <data>
        <variable
            name="category"
            type="com.yono.messeripos.models.CategoryModels" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_marginHorizontal="3dp">

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/cvCategory"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:backgroundTint="@color/colorPrimary"
            android:clickable="true"
            android:focusable="true"
            android:checkable="true"
            android:clipToPadding="true"
            android:background="@drawable/ic_rounded_circle"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent">


            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingHorizontal="20dp">

                <ImageView
                    android:id="@+id/image_cat"
                    android:layout_width="30dp"
                    android:layout_height="50dp"
                    android:src="@drawable/ic_meser"/>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/roboto"
                    android:text="@{category.nameCategory}"
                    android:textStyle="bold"
                    android:textSize="20sp"
                    android:textColor="#fff"
                    tools:text="elizabeth"
                    android:layout_toRightOf="@id/image_cat"
                    android:layout_centerInParent="true"/>


            </RelativeLayout>
        </com.google.android.material.card.MaterialCardView>

        <ImageButton
            android:id="@+id/categoryDelete"
            android:layout_width="0dp"
            android:layout_height="40dp"
            android:src="@drawable/ic_baseline_delete_24"
            android:textAlignment="textStart"
            android:textSize="10sp"
            android:layout_marginEnd="2dp"
            android:backgroundTint="#E53B3B"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cvCategory"
            app:layout_constraintEnd_toStartOf="@id/categoryUpdate"/>

        <ImageButton
            android:id="@+id/categoryUpdate"
            android:layout_width="0dp"
            android:layout_height="40dp"
            android:src="@drawable/ic_baseline_edit_24"
            android:textAlignment="textEnd"
            android:textSize="10sp"
            android:backgroundTint="#4CAF50"
            android:layout_marginStart="2dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cvCategory"
            app:layout_constraintStart_toEndOf="@id/categoryDelete" />

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

