<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="8dp"
    app:cardCornerRadius="8dp"
    app:cardElevation="2dp">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="16dp">

        <TextView
            android:id="@+id/tvStoreName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@android:color/black"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="SnackEnak" />

        <TextView
            android:id="@+id/tvOrderStatus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/blue_500"
            android:textSize="14sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="Menunggu Tagihan" />

        <View
            android:id="@+id/divider"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginTop="8dp"
            android:background="#E0E0E0"
            app:layout_constraintTop_toBottomOf="@+id/tvStoreName" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rvOrderItems"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            app:layout_constraintTop_toBottomOf="@+id/divider"
            tools:itemCount="1"
            tools:listitem="@layout/item_order_product" />

        <TextView
            android:id="@+id/tvShowMore"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:gravity="center_vertical"
            android:textColor="@android:color/darker_gray"
            android:textSize="14sp"
            android:visibility="visible"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/rvOrderItems"
            app:layout_constraintEnd_toEndOf="parent"
            tools:text="@string/show_more_product" />

        <View
            android:id="@+id/divider2"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginTop="8dp"
            android:background="#E0E0E0"
            app:layout_constraintTop_toBottomOf="@+id/tvShowMore" />

        <TextView
            android:id="@+id/tv_count_total_item"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/item_count_prod"
            android:textSize="14sp"
            android:fontFamily="@font/dmsans_bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/divider2" />

        <TextView
            android:id="@+id/tvTotalLabel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/total_order"
            android:textColor="@android:color/black"
            android:textSize="14sp"
            android:fontFamily="@font/dmsans_bold"
            app:layout_constraintEnd_toStartOf="@+id/tvTotalAmount"
            app:layout_constraintTop_toBottomOf="@+id/divider2"/>

        <TextView
            android:id="@+id/tvTotalAmount"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:textColor="@android:color/black"
            android:textSize="14sp"
            android:fontFamily="@font/dmsans_semibold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/divider2"
            tools:text="Rp500.000" />

        <TextView
            android:id="@+id/tvDeadlineLabel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/batas_tagihan"
            android:textSize="14sp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/tv_count_total_item" />

        <TextView
            android:id="@+id/tvDeadlineDate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="4dp"
            android:layout_marginTop="8dp"
            android:textColor="@android:color/black"
            android:textSize="14sp"
            app:layout_constraintStart_toEndOf="@+id/tvDeadlineLabel"
            app:layout_constraintTop_toBottomOf="@+id/tv_count_total_item"
            tools:text="28 Oktober 2024" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/btn_left"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/bg_button_outline"
            android:backgroundTint="@color/white"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvDeadlineDate"
            app:layout_constraintStart_toStartOf="parent"
            android:layout_marginTop="8dp"/>
        <com.google.android.material.button.MaterialButton
            android:id="@+id/btn_right"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/bg_button_filled"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            android:text="Kirim Bukti Bayar"
            app:layout_constraintTop_toBottomOf="@id/tvDeadlineDate"
            app:layout_constraintEnd_toEndOf="parent"
            android:layout_marginTop="8dp"/>

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>