<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="8dp"
    app:cardCornerRadius="12dp"
    app:cardElevation="2dp"
    style="@style/Widget.MaterialComponents.CardView">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipChildren="true">

        <ImageView
            android:id="@+id/ivPhotoBlur"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:visibility="gone" />

        <View
            android:id="@+id/photoScrim"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#99000000"
            android:visibility="gone" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="16dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <ImageButton
                android:id="@+id/btnExpand"
                android:layout_width="32dp"
                android:layout_height="32dp"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="Expandir"
                android:focusable="false"
                android:focusableInTouchMode="false"
                android:scaleType="center"
                android:src="@android:drawable/arrow_down_float"
                android:tint="?attr/colorOnSurfaceVariant" />

            <View
                android:id="@+id/categoryDot"
                android:layout_width="10dp"
                android:layout_height="10dp"
                android:layout_marginEnd="6dp"
                android:background="@drawable/circle_category"
                android:visibility="gone" />

            <TextView
                android:id="@+id/textTitle"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:ellipsize="end"
                android:maxLines="1"
                android:textColor="?attr/colorOnSurface"
                android:textSize="16sp"
                android:textStyle="bold" />

            <com.google.android.material.chip.Chip
                android:id="@+id/chipRecurrence"
                style="@style/Widget.Material3.Chip.Assist"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="gone" />

            <ImageButton
                android:id="@+id/btnMarkComplete"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/mark_completed"
                android:focusable="false"
                android:focusableInTouchMode="false"
                android:scaleType="center"
                android:src="@drawable/ic_check"
                android:tint="?attr/colorOnSurface" />

        </LinearLayout>

        <TextView
            android:id="@+id/textDate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="?attr/colorPrimary"
            android:textSize="12sp"
            android:visibility="gone" />

        <LinearLayout
            android:id="@+id/detailsSection"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:visibility="gone">

            <TextView
                android:id="@+id/textContent"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="4dp"
                android:textColor="?attr/colorOnSurfaceVariant"
                android:textSize="14sp" />

            <TextView
                android:id="@+id/textReminder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:drawablePadding="4dp"
                android:textColor="?attr/colorPrimary"
                android:textSize="12sp" />

            <LinearLayout
                android:id="@+id/actionsRow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:gravity="end"
                android:orientation="horizontal">

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnEdit"
                    style="@style/Widget.Material3.Button.TextButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:icon="@drawable/ic_pencil"
                    android:text="@string/edit_note"
                    app:iconTint="?attr/colorOnSurface" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnDelete"
                    style="@style/Widget.Material3.Button.TextButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:icon="@drawable/ic_trash"
                    android:text="@string/delete"
                    android:textColor="?attr/colorError"
                    app:iconTint="?attr/colorError" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnRestore"
                    style="@style/Widget.Material3.Button.TextButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:icon="@android:drawable/ic_menu_revert"
                    android:text="@string/restore"
                    android:visibility="gone" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnPermanentDelete"
                    style="@style/Widget.Material3.Button.TextButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:icon="@drawable/ic_trash"
                    android:text="@string/delete_permanently"
                    android:visibility="gone"
                    app:iconTint="?attr/colorError" />

            </LinearLayout>

        </LinearLayout>

        </LinearLayout>

    </FrameLayout>

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