<?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>
        <variable
            name="viewModel"
            type="com.dspread.pos.ui.mulberry.MulberryItemViewModel" />
    </data>

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:onClick="@{() -> viewModel.itemClick.execute()}"
        app:cardCornerRadius="8dp"
        app:cardElevation="4dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="vertical"
            android:padding="14dp">

            <ImageView
                android:id="@+id/navImage"
                android:layout_width="wrap_content"
                android:layout_height="100dp"
                android:src="@{viewModel.icon}"
                android:scaleType="fitCenter"
                tools:src="@drawable/ax_card_grey" /> <!-- Use your actual default drawable -->

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@{viewModel.title}"
                android:textSize="16sp"
                android:textStyle="bold"
                tools:text="Payment" />
        </LinearLayout>
    </androidx.cardview.widget.CardView>
</layout>