<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView android:layout_width="match_parent"
    android:scrollbars="none"
    android:orientation="vertical"
    android:layout_height="wrap_content"
    android:fillViewport="true"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:android="http://schemas.android.com/apk/res/android">

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

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

            <com.facebook.shimmer.ShimmerFrameLayout
                android:visibility="gone"
                android:layout_width="0dp"
                android:layout_marginTop="4dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="20dp"
                app:layout_constraintEnd_toStartOf="@+id/bottomsheet_schedule_button"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                android:id="@+id/shimmer_loading_title"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/bottom_sheet_loading_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLines="2"
                    android:singleLine="false"
                    android:text="@string/loading"
                    android:textSize="25sp" />

            </com.facebook.shimmer.ShimmerFrameLayout>


            <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/download"
                android:textSize="25sp"
                app:layout_constraintEnd_toStartOf="@+id/bottomsheet_schedule_button"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <com.facebook.shimmer.ShimmerFrameLayout
                android:visibility="gone"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                app:layout_constraintHorizontal_bias="0.0"
                android:layout_marginEnd="20dp"
                app:layout_constraintEnd_toStartOf="@+id/bottomsheet_schedule_button"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/shimmer_loading_title"
                android:id="@+id/shimmer_loading_subtitle"
                android:orientation="vertical">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLines="2"
                    android:singleLine="false"
                    android:text="@string/please_wait"
                    android:textSize="12sp" />

            </com.facebook.shimmer.ShimmerFrameLayout>

            <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/configure_download"
                android:textSize="12sp"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintEnd_toStartOf="@+id/bottomsheet_schedule_button"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/bottom_sheet_title" />

            <Button
                android:id="@+id/bottomsheet_schedule_button"
                style="@style/Widget.Material3.Button.IconButton.Filled"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="10dp"
                android:outlineProvider="none"
                app:icon="@drawable/ic_clock"
                android:contentDescription="@string/schedule"
                app:layout_constraintBottom_toBottomOf="@id/bottomsheet_download_button"
                app:layout_constraintEnd_toStartOf="@+id/bottomsheet_download_button"
                app:layout_constraintTop_toTopOf="@id/bottomsheet_download_button" />

            <Button
                android:id="@+id/bottomsheet_download_button"
                style="@style/Widget.Material3.Button.ElevatedButton.Icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:autoLink="all"
                android:text="@string/download"
                android:outlineProvider="none"
                android:stateListAnimator="@null"
                app:icon="@drawable/ic_down"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />


        </androidx.constraintlayout.widget.ConstraintLayout>

        <com.google.android.material.tabs.TabLayout
            android:id="@+id/download_tablayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:backgroundTint="@android:color/transparent"
            app:tabGravity="start"
            app:tabMinWidth="0dp"
            app:tabMode="scrollable">

            <com.google.android.material.tabs.TabItem
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="@string/audio" />

            <com.google.android.material.tabs.TabItem
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="@string/video" />

            <com.google.android.material.tabs.TabItem
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="@string/command" />


        </com.google.android.material.tabs.TabLayout>

        <androidx.viewpager2.widget.ViewPager2
            android:id="@+id/download_viewpager"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <Button
                android:id="@+id/bottom_sheet_link"
                style="@style/Widget.Material3.Button.TextButton.Icon"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:singleLine="true"
                android:text="@string/app_name"
                android:textAlignment="textStart"
                android:textSize="15sp"
                app:icon="@drawable/ic_link"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/bottomsheet_incognito"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <Button
                android:id="@+id/bottomsheet_incognito"
                style="@style/Widget.Material3.Button.IconButton.Filled"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:outlineProvider="none"
                android:contentDescription="@string/incognito"
                app:icon="@drawable/ic_nightly"
                android:alpha="0.3"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

        </androidx.constraintlayout.widget.ConstraintLayout>



        <LinearLayout
            android:layout_width="match_parent"
            android:gravity="end"
            android:visibility="gone"
            android:paddingBottom="10dp"
            android:layout_marginHorizontal="15dp"
            android:layout_height="wrap_content">

            <Button
                android:id="@+id/update_item"
                style="@style/Widget.Material3.Button.ElevatedButton.Icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:autoLink="all"
                android:outlineProvider="none"
                android:text="@string/update"
                app:icon="@drawable/ic_update"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

        </LinearLayout>

    </LinearLayout>

</androidx.core.widget.NestedScrollView>