<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/format_card_constraintLayout"
    android:layout_width="match_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:checkable="true"
    android:clickable="true"
    android:focusable="true"
    android:backgroundTint="@android:color/transparent"
    app:checkedIcon="@null"
    app:shapeAppearance="@style/ShapeAppearanceOverlay.Avatar"
    app:strokeWidth="0dp"
    app:cardPreventCornerOverlap="true"
    android:layout_height="wrap_content">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:paddingVertical="5dp"
        android:paddingHorizontal="10dp"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/container"
            android:layout_width="50dp"
            app:layout_constraintHorizontal_weight="1"
            android:background="@drawable/rounded_corner"
            android:backgroundTint="?attr/colorPrimaryInverse"
            android:textColor="@color/white"
            android:clickable="false"
            android:layout_height="0dp"
            app:layout_constraintDimensionRatio="H,1:1"
            android:gravity="center"
            android:minWidth="30dp"
            app:cornerRadius="10dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />


        <com.google.android.material.progressindicator.LinearProgressIndicator
            android:id="@+id/format_loading_progress"
            android:visibility="gone"
            android:layout_width="0dp"
            android:indeterminate="true"
            app:trackColor="#000"
            android:layout_gravity="bottom"
            android:alpha="0.3"
            android:scaleY="200"
            app:layout_constraintTop_toTopOf="@id/container"
            app:layout_constraintBottom_toBottomOf="@id/container"
            app:layout_constraintStart_toStartOf="@id/container"
            app:layout_constraintEnd_toEndOf="@id/container"
            android:layout_height="wrap_content" />

        <TextView
            android:id="@+id/format_note"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:gravity="top"
            android:maxLines="2"
            android:paddingHorizontal="5dp"
            android:textDirection="locale"
            android:textSize="17sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/container"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/audio_formats"
            style="@style/Widget.Material3.FloatingActionButton.Large.Primary"
            android:layout_width="wrap_content"
            android:visibility="gone"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="5dp"
            android:background="@drawable/rounded_corner"
            android:backgroundTint="?attr/colorPrimary"
            android:clickable="false"
            android:ellipsize="end"
            android:gravity="center"
            android:maxLength="17"
            android:minWidth="30dp"
            android:paddingHorizontal="5dp"
            android:textStyle="bold"
            app:cornerRadius="10dp"
            app:drawableStartCompat="@drawable/ic_music_formatcard"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintStart_toEndOf="@+id/container"
            app:layout_constraintTop_toBottomOf="@+id/format_note" />

        <androidx.constraintlayout.widget.Barrier
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/barrier"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="container, audio_formats" />

        <com.google.android.material.chip.ChipGroup
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:chipSpacingHorizontal="0dp"
            app:chipSpacingVertical="5dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/container">

            <TextView
                android:id="@+id/format_id"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:background="@drawable/rounded_corner"
                android:backgroundTint="?attr/backgroundColor"
                android:clickable="false"
                android:ellipsize="end"
                android:gravity="center"
                android:maxLength="17"
                android:minWidth="30dp"
                android:paddingHorizontal="5dp"
                android:textStyle="bold"
                app:cornerRadius="10dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/codec"
                style="@style/Widget.Material3.FloatingActionButton.Large.Secondary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:background="@drawable/rounded_corner"
                android:backgroundTint="?attr/colorSecondary"
                android:clickable="false"
                android:ellipsize="end"
                android:gravity="center"
                android:maxLength="17"
                android:minWidth="30dp"
                android:paddingHorizontal="5dp"
                android:textStyle="bold"
                app:cornerRadius="10dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/file_size"
                style="@style/Widget.Material3.FloatingActionButton.Large.Tertiary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:background="@drawable/rounded_corner"
                android:backgroundTint="?attr/colorSecondary"
                android:clickable="false"
                android:gravity="center"
                android:minWidth="30dp"
                android:paddingHorizontal="5dp"
                android:textStyle="bold"
                app:cornerRadius="10dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

        </com.google.android.material.chip.ChipGroup>

    </androidx.constraintlayout.widget.ConstraintLayout>


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