<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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:id="@+id/mediaListContainer"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/bottom_sheet_background">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <ProgressBar
            android:id="@+id/mediaListProgressBar"
            style="?android:attr/progressBarStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:indeterminate="true"
            tools:visibility="invisible" />

        <LinearLayout
            android:id="@+id/mediaListLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="32dp"
            android:orientation="vertical"
            android:visibility="invisible"
            tools:visibility="visible">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/mediaTitle"
                    android:layout_width="0dp"
                    android:layout_height="54dp"
                    android:layout_weight="1"
                    android:fontFamily="@font/poppins"
                    android:gravity="center_vertical"
                    android:paddingStart="16dp"
                    android:paddingEnd="16dp"
                    android:text="@string/list_editor"
                    android:textSize="20sp"
                    android:textStyle="bold" />

            </LinearLayout>

            <com.google.android.material.textfield.TextInputLayout
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:layout_marginTop="16dp"
                android:hint="@string/status"
                app:boxCornerRadiusBottomEnd="16dp"
                app:boxCornerRadiusBottomStart="16dp"
                app:boxCornerRadiusTopEnd="16dp"
                app:boxCornerRadiusTopStart="16dp"
                app:boxStrokeColor="@color/text_input_layout_stroke_color"
                app:hintAnimationEnabled="true"
                app:startIconDrawable="@drawable/ic_round_playlist_play_24">

                <AutoCompleteTextView
                    android:id="@+id/mediaListStatus"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/poppins_bold"
                    android:freezesText="false"
                    android:inputType="none"
                    android:padding="8dp"
                    android:text="@string/watch"
                    android:textAllCaps="true"
                    android:textColor="?android:attr/textColorSecondary"

                    android:textSize="14sp"
                    tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
            </com.google.android.material.textfield.TextInputLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="16dp"
                android:orientation="horizontal">

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/mediaListProgressLayout"
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:hint="@string/progress"
                    app:boxCornerRadiusBottomEnd="16dp"
                    app:boxCornerRadiusBottomStart="16dp"
                    app:boxCornerRadiusTopEnd="16dp"
                    app:boxCornerRadiusTopStart="16dp"
                    app:boxStrokeColor="@color/text_input_layout_stroke_color"
                    app:endIconMode="none"
                    app:hintAnimationEnabled="true"
                    app:startIconDrawable="@drawable/ic_round_add_circle_outline_24"
                    app:suffixTextAppearance="@style/Suffix">

                    <AutoCompleteTextView
                        android:id="@+id/mediaListProgress"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:fontFamily="@font/poppins_bold"
                        android:inputType="number"
                        android:maxLength="4"
                        android:padding="8dp"
                        android:textColor="?android:attr/textColorSecondary"
                        android:textSize="14sp"
                        tools:ignore="LabelFor,TextContrastCheck" />

                </com.google.android.material.textfield.TextInputLayout>

                <View
                    android:layout_width="8dp"
                    android:layout_height="match_parent" />

                <Button
                    android:id="@+id/mediaListIncrement"
                    style="@style/Widget.Material3.Button.OutlinedButton"
                    android:layout_width="wrap_content"
                    android:layout_height="48dp"
                    android:layout_marginTop="-2dp"
                    android:elevation="0dp"
                    android:fontFamily="@font/poppins_bold"
                    android:insetTop="0dp"
                    android:insetBottom="0dp"
                    android:minWidth="@null"
                    android:paddingLeft="16dp"
                    android:paddingRight="16dp"
                    android:singleLine="true"
                    android:text="+1\u0020"
                    android:textSize="16sp"
                    app:cornerRadius="16dp"
                    app:strokeColor="?attr/colorPrimaryContainer"
                    tools:ignore="HardcodedText" />

            </LinearLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/mediaListScoreLayout"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:layout_marginTop="16dp"
                android:hint="@string/score"
                app:boxCornerRadiusBottomEnd="16dp"
                app:boxCornerRadiusBottomStart="16dp"
                app:boxCornerRadiusTopEnd="16dp"
                app:boxCornerRadiusTopStart="16dp"
                app:boxStrokeColor="@color/text_input_layout_stroke_color"
                app:endIconMode="none"
                app:hintAnimationEnabled="true"
                app:startIconDrawable="@drawable/ic_round_star_24"
                app:suffixText="@string/score_suffix"
                app:suffixTextAppearance="@style/Suffix">

                <AutoCompleteTextView
                    android:id="@+id/mediaListScore"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/poppins_bold"
                    android:inputType="numberDecimal"
                    android:padding="8dp"
                    android:textColor="?android:attr/textColorSecondary"
                    android:textSize="14sp"
                    tools:ignore="LabelFor,TextContrastCheck" />

            </com.google.android.material.textfield.TextInputLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:baselineAligned="false"
                android:orientation="horizontal">

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/mediaListStartLayout"
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                    android:layout_width="0dp"
                    android:layout_height="56dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginEnd="16dp"
                    android:layout_weight="1"
                    android:hint="@string/started_at"
                    app:boxCornerRadiusBottomEnd="16dp"
                    app:boxCornerRadiusBottomStart="16dp"
                    app:boxCornerRadiusTopEnd="16dp"
                    app:boxCornerRadiusTopStart="16dp"
                    app:boxStrokeColor="@color/text_input_layout_stroke_color"
                    app:endIconMode="none"
                    app:hintAnimationEnabled="true"
                    app:startIconDrawable="@drawable/ic_round_date_range_24"
                    app:suffixTextAppearance="@style/Suffix">

                    <AutoCompleteTextView
                        android:id="@+id/mediaListStart"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:ellipsize="end"
                        android:fontFamily="@font/poppins_bold"
                        android:inputType="none"
                        android:padding="8dp"
                        android:singleLine="true"
                        android:textAllCaps="true"
                        android:textColor="?android:attr/textColorSecondary"
                        android:textSize="14sp"
                        tools:ignore="LabelFor,TextContrastCheck" />

                </com.google.android.material.textfield.TextInputLayout>

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/mediaListEndLayout"
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                    android:layout_width="0dp"
                    android:layout_height="56dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="16dp"
                    android:layout_weight="1"
                    android:hint="@string/completed_at"
                    app:boxCornerRadiusBottomEnd="16dp"
                    app:boxCornerRadiusBottomStart="16dp"
                    app:boxCornerRadiusTopEnd="16dp"
                    app:boxCornerRadiusTopStart="16dp"
                    app:boxStrokeColor="@color/text_input_layout_stroke_color"
                    app:endIconMode="none"
                    app:hintAnimationEnabled="true"
                    app:suffixTextAppearance="@style/Suffix">

                    <AutoCompleteTextView
                        android:id="@+id/mediaListEnd"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:ellipsize="end"
                        android:fontFamily="@font/poppins_bold"
                        android:inputType="none"
                        android:padding="8dp"
                        android:singleLine="true"
                        android:textAllCaps="true"
                        android:textColor="?android:attr/textColorSecondary"
                        android:textSize="14sp"
                        tools:ignore="LabelFor,TextContrastCheck" />

                </com.google.android.material.textfield.TextInputLayout>

            </LinearLayout>

            <ani.dantotsu.others.Xpandable
                android:id="@+id/mediaListExpandable"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="48dp"
                    android:fontFamily="@font/poppins_bold"
                    android:gravity="center_vertical"
                    android:text="@string/other"
                    android:textColor="?attr/colorSecondary"
                    app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24" />

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/mediaListRepeatLayout"
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/total_repeats"
                    app:boxCornerRadiusBottomEnd="16dp"
                    app:boxCornerRadiusBottomStart="16dp"
                    app:boxCornerRadiusTopEnd="16dp"
                    app:boxCornerRadiusTopStart="16dp"
                    app:endIconMode="none"
                    app:hintAnimationEnabled="true"
                    app:startIconDrawable="@drawable/ic_round_refresh_24"
                    app:suffixTextAppearance="@style/Suffix">

                    <AutoCompleteTextView
                        android:id="@+id/mediaListRewatch"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:fontFamily="@font/poppins_bold"
                        android:inputType="number"
                        android:maxLength="4"
                        android:padding="8dp"
                        android:textColor="?android:attr/textColorSecondary"
                        android:textSize="14sp"
                        tools:ignore="LabelFor,TextContrastCheck" />

                </com.google.android.material.textfield.TextInputLayout>

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/mediaListNotesLayout"
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:hint="@string/note"
                    app:boxCornerRadiusBottomEnd="16dp"
                    app:boxCornerRadiusBottomStart="16dp"
                    app:boxCornerRadiusTopEnd="16dp"
                    app:boxCornerRadiusTopStart="16dp"
                    app:endIconMode="none"
                    app:hintAnimationEnabled="true"
                    app:startIconDrawable="@drawable/ic_round_edit_note_24"
                    app:suffixTextAppearance="@style/Suffix">

                    <AutoCompleteTextView
                        android:id="@+id/mediaListNotes"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:fontFamily="@font/poppins_bold"
                        android:inputType="textMultiLine"
                        android:padding="8dp"
                        android:textColor="?android:attr/textColorSecondary"
                        android:textSize="14sp"
                        tools:ignore="LabelFor,TextContrastCheck" />

                </com.google.android.material.textfield.TextInputLayout>

                <com.google.android.material.materialswitch.MaterialSwitch
                    android:id="@+id/mediaListPrivate"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:fontFamily="@font/poppins_bold"
                    android:text="@string/list_private" />

                <com.google.android.material.materialswitch.MaterialSwitch
                    android:id="@+id/mediaListShow"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:fontFamily="@font/poppins_bold"
                    android:text="@string/hide_in_home_screen" />
                <TextView
                    android:id="@+id/mediaListAddCustomList"
                    android:layout_width="match_parent"
                    android:layout_height="48dp"
                    android:fontFamily="@font/poppins_bold"
                    android:gravity="center_vertical"
                    android:text="@string/custom_lists"
                    android:textColor="?attr/colorPrimary" />

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

                </LinearLayout>

            </ani.dantotsu.others.Xpandable>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="16dp"
                android:orientation="horizontal">

                <Button
                    android:id="@+id/mediaListDelete"
                    style="@style/Widget.Material3.Button.OutlinedButton"
                    android:layout_width="128dp"
                    android:layout_height="56dp"
                    android:layout_gravity="center"
                    android:fontFamily="@font/poppins_bold"
                    android:insetTop="0dp"
                    android:insetBottom="0dp"
                    android:padding="8dp"
                    android:text="@string/delete"
                    android:textSize="16sp"
                    app:cornerRadius="16dp"
                    app:strokeColor="?attr/colorPrimaryContainer" />

                <Button
                    android:id="@+id/mediaListSave"
                    style="@style/Widget.Material3.Button.OutlinedButton"
                    android:layout_width="0dp"
                    android:layout_height="56dp"
                    android:layout_marginStart="16dp"
                    android:layout_weight="1"
                    android:fontFamily="@font/poppins_bold"
                    android:insetTop="0dp"
                    android:insetBottom="0dp"
                    android:padding="8dp"
                    android:text="@string/save"
                    android:textSize="16sp"
                    app:cornerRadius="16dp"
                    app:strokeColor="?attr/colorPrimaryContainer" />
            </LinearLayout>
        </LinearLayout>

        <androidx.cardview.widget.CardView
            android:layout_width="32dp"
            android:layout_height="4dp"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="14dp"
            app:cardBackgroundColor="?attr/colorPrimary"
            app:cardCornerRadius="2dp"
            app:cardElevation="0dp">

        </androidx.cardview.widget.CardView>

    </FrameLayout>
</androidx.core.widget.NestedScrollView>