<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="8dp"
    android:layout_marginRight="8dp"
    android:layout_marginTop="2dp"
    android:layout_marginBottom="2dp"
    android:gravity="center_vertical">
    <androidx.cardview.widget.CardView
        android:id="@+id/card_view"
        android:layout_gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardCornerRadius="@dimen/card_corner_radius"
        app:strokeColor="@android:color/transparent"
        app:strokeWidth="0dp">
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:background="@null">

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/button_action"
                android:textSize="16sp"
                android:src="@drawable/ic_baseline_delete_forever_24"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@android:color/transparent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                android:importantForAccessibility="no"
                android:layout_marginLeft="8dp"
                tools:ignore="RtlHardcoded" />

            <!-- Module components -->

            <com.google.android.material.switchmaterial.SwitchMaterial
                android:id="@+id/switch_action"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintRight_toRightOf="parent" />

            <TextView
                android:id="@+id/title_text"
                android:textSize="16sp"
                android:maxLines="1"
                android:text="@string/loading"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@+id/button_action" />

            <TextView
                android:id="@+id/credit_text"
                android:textSize="12sp"
                android:text="@string/loading"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/title_text"
                app:layout_constraintTop_toBottomOf="@id/title_text" />

            <TextView
                android:id="@+id/description_text"
                android:textSize="16sp"
                android:text="@string/loading"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="4dp"
                android:layout_below="@+id/credit_text"
                app:layout_constraintTop_toBottomOf="@id/credit_text" />

            <TextView
                android:id="@+id/updated_text"
                android:textSize="12sp"
                android:text="@string/loading"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="bottom"
                app:layout_constraintTop_toBottomOf="@+id/description_text"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent" />

            <!-- Module actions -->

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/button_action1"
                android:textSize="16sp"
                android:visibility="gone"
                android:src="@drawable/ic_baseline_error_24"
                android:layout_width="@dimen/module_action_icon_size"
                android:layout_height="@dimen/module_action_icon_size"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                app:layout_constraintTop_toBottomOf="@id/description_text"
                app:layout_constraintRight_toRightOf="parent"
                android:importantForAccessibility="no"
                android:layout_marginLeft="8dp"
                android:layout_marginRight="3dp"
                android:layout_marginBottom="4dp"
                tools:ignore="RtlHardcoded" />

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/button_action2"
                android:textSize="16sp"
                android:visibility="gone"
                android:src="@drawable/ic_baseline_error_24"
                android:layout_width="@dimen/module_action_icon_size"
                android:layout_height="@dimen/module_action_icon_size"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                app:layout_constraintTop_toBottomOf="@id/description_text"
                app:layout_constraintRight_toLeftOf="@id/button_action1"
                android:importantForAccessibility="no"
                android:layout_marginLeft="8dp"
                tools:ignore="RtlHardcoded" />

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/button_action3"
                android:textSize="16sp"
                android:visibility="gone"
                android:src="@drawable/ic_baseline_error_24"
                android:layout_width="@dimen/module_action_icon_size"
                android:layout_height="@dimen/module_action_icon_size"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                app:layout_constraintTop_toBottomOf="@id/description_text"
                app:layout_constraintRight_toLeftOf="@id/button_action2"
                android:importantForAccessibility="no"
                android:layout_marginLeft="8dp"
                tools:ignore="RtlHardcoded" />

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/button_action4"
                android:textSize="16sp"
                android:visibility="gone"
                android:src="@drawable/ic_baseline_error_24"
                android:layout_width="@dimen/module_action_icon_size"
                android:layout_height="@dimen/module_action_icon_size"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                app:layout_constraintTop_toBottomOf="@id/description_text"
                app:layout_constraintRight_toLeftOf="@id/button_action3"
                android:importantForAccessibility="no"
                android:layout_marginLeft="8dp"
                tools:ignore="RtlHardcoded" />

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/button_action5"
                android:textSize="16sp"
                android:visibility="gone"
                android:src="@drawable/ic_baseline_error_24"
                android:layout_width="@dimen/module_action_icon_size"
                android:layout_height="@dimen/module_action_icon_size"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                app:layout_constraintTop_toBottomOf="@id/description_text"
                app:layout_constraintRight_toLeftOf="@id/button_action4"
                android:importantForAccessibility="no"
                android:layout_marginLeft="8dp"
                tools:ignore="RtlHardcoded" />

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/button_action6"
                android:textSize="16sp"
                android:visibility="gone"
                android:src="@drawable/ic_baseline_error_24"
                android:layout_width="@dimen/module_action_icon_size"
                android:layout_height="@dimen/module_action_icon_size"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                app:layout_constraintTop_toBottomOf="@id/description_text"
                app:layout_constraintRight_toLeftOf="@id/button_action5"
                android:importantForAccessibility="no"
                android:layout_marginLeft="8dp"
                tools:ignore="RtlHardcoded" />

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