<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_height="wrap_content">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingBottom="10dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="20dp"
            android:orientation="horizontal"
            android:paddingTop="20dp">

            <TextView
                android:id="@+id/bottom_sheet_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="4dp"
                android:maxLines="2"
                android:layout_marginEnd="20dp"
                android:singleLine="false"
                android:text="@string/format"
                android:textSize="25sp"
                app:layout_constraintEnd_toStartOf="@+id/format_buttons"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/bottom_sheet_subtitle"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:maxLines="2"
                android:layout_marginEnd="20dp"
                android:singleLine="false"
                android:text="@string/select_format"
                android:textSize="12sp"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintEnd_toStartOf="@+id/format_buttons"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/bottom_sheet_title" />

            <LinearLayout
                android:id="@+id/format_buttons"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                >

                <Button
                    android:id="@+id/format_filter"
                    style="@style/Widget.Material3.Button.IconButton.Filled"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:icon="@drawable/baseline_align_horizontal_left_24"
                    app:layout_constraintBottom_toBottomOf="@id/format_refresh"
                    app:layout_constraintEnd_toStartOf="@+id/format_refresh"
                    app:layout_constraintTop_toTopOf="@id/format_refresh" />

                <Button
                    android:id="@+id/format_refresh"
                    style="@style/Widget.Material3.Button.ElevatedButton.Icon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:autoLink="all"
                    android:text="@string/update"
                    android:contentDescription="@string/update_formats"
                    android:layout_marginStart="10dp"
                    app:icon="@drawable/ic_refresh"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <Button
                    android:id="@+id/format_ok"
                    android:visibility="gone"
                    style="@style/Widget.Material3.Button.ElevatedButton.Icon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:autoLink="all"
                    android:text="@string/ok"
                    app:icon="@drawable/ic_check"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </LinearLayout>



        </androidx.constraintlayout.widget.ConstraintLayout>

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="10dp"
            android:scrollbars="none">

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

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

                    <Button
                        android:id="@+id/video_title"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingHorizontal="20dp"
                        android:clickable="false"
                        style="@style/Widget.Material3.Button.ElevatedButton.Icon"
                        android:gravity="start"
                        app:cornerRadius="0dp"
                        android:textStyle="bold"
                        android:textSize="16sp"
                        android:paddingVertical="20dp"
                        android:text="@string/video" />

                    <GridLayout
                        android:id="@+id/video_linear_layout"
                        android:layout_width="match_parent"
                        android:columnCount="1"
                        android:alignmentMode="alignBounds"
                        android:layout_height="wrap_content" />
                </LinearLayout>

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

                    <Button
                        android:id="@+id/audio_title"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingHorizontal="20dp"
                        android:textStyle="bold"
                        android:textSize="16sp"
                        android:clickable="false"
                        style="@style/Widget.Material3.Button.ElevatedButton.Icon"
                        android:gravity="start"
                        app:cornerRadius="0dp"
                        android:paddingVertical="20dp"
                        android:text="@string/audio" />

                    <GridLayout
                        android:id="@+id/audio_linear_layout"
                        android:layout_width="match_parent"
                        android:columnCount="1"
                        android:alignmentMode="alignBounds"
                        android:layout_height="wrap_content" />
                </LinearLayout>

            </LinearLayout>

        </androidx.core.widget.NestedScrollView>


        <com.facebook.shimmer.ShimmerFrameLayout
            android:id="@+id/format_list_shimmer"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingHorizontal="10dp"
            android:paddingTop="10dp">

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

                <include layout="@layout/format_item_shimmer" />

                <include layout="@layout/format_item_shimmer" />

                <include layout="@layout/format_item_shimmer" />

                <include layout="@layout/format_item_shimmer" />

                <include layout="@layout/format_item_shimmer" />

            </LinearLayout>

        </com.facebook.shimmer.ShimmerFrameLayout>



    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>