<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:padding="8dp">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/addon_card"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        app:cardBackgroundColor="@android:color/transparent"
        app:cardCornerRadius="12dp"
        app:cardElevation="0dp"
        app:strokeColor="?attr/colorOutline"
        app:strokeWidth="1dp"
        android:clickable="true"
        android:focusable="true"
        android:foreground="?attr/selectableItemBackground"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/delete_card"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingStart="16dp"
            android:paddingEnd="12dp"
            android:paddingTop="12dp"
            android:paddingBottom="12dp">

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/title"
                style="@style/TextAppearance.Material3.HeadlineSmall"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:textAlignment="viewStart"
                android:textSize="16sp"
                android:ellipsize="end"
                android:maxLines="1"
                app:lineHeight="20dp"
                tools:text="1440p Resolution"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/addon_switch"
                android:layout_marginEnd="8dp" />

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/version"
                style="@style/TextAppearance.Material3.BodySmall"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:textAlignment="viewStart"
                android:ellipsize="end"
                android:maxLines="1"
                tools:text="1.0.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/title"
                app:layout_constraintEnd_toStartOf="@+id/addon_switch" />

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/addon_switch"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:focusable="true"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:layout_marginEnd="4dp" />

        </androidx.constraintlayout.widget.ConstraintLayout>

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

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/delete_card"
        android:layout_width="48dp"
        android:layout_height="0dp"
        android:layout_marginEnd="8dp"
        app:cardBackgroundColor="@android:color/transparent"
        app:cardCornerRadius="10dp"
        app:cardElevation="0dp"
        app:strokeColor="?attr/colorOutline"
        app:strokeWidth="1dp"
        android:clickable="true"
        android:focusable="true"
        android:foreground="?attr/selectableItemBackgroundBorderless"
        app:layout_constraintStart_toEndOf="@id/addon_card"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:foregroundGravity="center">

            <ImageButton
                android:id="@+id/button_delete"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_gravity="center"
                android:background="@null"
                android:src="@drawable/ic_delete"
                app:tint="?attr/colorPrimary"
                android:contentDescription="@string/delete" />

        </FrameLayout>

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

</androidx.constraintlayout.widget.ConstraintLayout>
