<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="@drawable/bg_popup_count"
    android:padding="16dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:gravity="center_horizontal"
        android:paddingHorizontal="8dp"
        android:paddingTop="32dp">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center">
            <TextView
                android:id="@+id/tv_active_wholesale"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Beli Harga Grosir"
                android:textSize="16sp"
                android:fontFamily="@font/dmsans_semibold"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"/>

            <com.google.android.material.switchmaterial.SwitchMaterial
                android:id="@+id/switch_price"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="4dp"
                android:buttonTint="@color/blue_500"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Minimal pembelian 10 buah untuk harga grosir"
            android:fontFamily="@font/dmsans_mediumitalic"
            android:textSize="12sp"
            android:textColor="@color/black_300"
            android:layout_marginBottom="8dp"/>


        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/container_count"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center">
            <TextView
                android:id="@+id/tvQuantityTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Jumlah Produk"
                android:fontFamily="@font/dmsans_semibold"
                android:textSize="16sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"/>

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:padding="4dp"
                android:orientation="horizontal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <ImageButton
                    android:id="@+id/btnDecrease"
                    android:layout_width="30dp"
                    android:layout_height="30dp"
                    android:background="@drawable/bg_button_filled"
                    android:src="@drawable/btn_minus_24dp"
                    app:tint="@color/white"/>

                <TextView
                    android:id="@+id/tvQuantity"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="24dp"
                    android:text="1"
                    android:textSize="16sp" />

                <ImageButton
                    android:id="@+id/btnIncrease"
                    android:layout_width="30dp"
                    android:layout_height="30dp"
                    android:background="@drawable/bg_button_filled"
                    android:src="@drawable/baseline_add_24"
                    app:tint="@color/white" />
            </LinearLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>


        <Button
            android:id="@+id/btnBuyNow"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Beli Sekarang"
            android:fontFamily="@font/dmsans_semibold"
            android:layout_marginTop="24dp"
            android:backgroundTint="@color/blue_500"
            android:textColor="@android:color/white" />
    </LinearLayout>

    <!-- Tombol X Close -->
    <ImageButton
        android:id="@+id/btnCloseDialog"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_gravity="end|top"
        android:background="@android:color/transparent"
        android:src="@android:drawable/ic_menu_close_clear_cancel"
        android:contentDescription="Close" />
</FrameLayout>

