<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".settings.SettingsAccountActivity">

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

        <androidx.cardview.widget.CardView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="32dp"
            app:cardBackgroundColor="@color/nav_bg_inv"
            app:cardCornerRadius="16dp"
            app:cardElevation="0dp">

            <ImageButton
                android:id="@+id/anilistSettingsBack"
                android:layout_width="64dp"
                android:layout_height="64dp"
                android:background="@color/nav_bg_inv"
                android:padding="16dp"
                app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
                app:tint="?attr/colorOnBackground"
                tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
        </androidx.cardview.widget.CardView>

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

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="32dp"
                android:layout_marginEnd="10dp"
                android:layout_marginBottom="32dp"
                android:layout_weight="1"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/anilist_settings"
                android:textSize="28sp" />

            <ImageView
                android:layout_width="96dp"
                android:layout_height="96dp"
                android:layout_marginEnd="20dp"
                android:layout_marginBottom="20dp"
                android:padding="24dp"
                app:srcCompat="@drawable/ic_anilist"
                app:tint="?attr/colorOnBackground"
                tools:ignore="ContentDescription" />

        </LinearLayout>

        <ani.dantotsu.others.Xpandable
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="64dp"
                android:layout_marginTop="8dp"
                android:fontFamily="@font/poppins_bold"
                android:gravity="center_vertical"
                android:paddingHorizontal="32dp"
                android:text="@string/anime_manga"
                android:textColor="?attr/colorSecondary"
                app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
                tools:ignore="TextContrastCheck" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/selected_title_language" />

            <com.google.android.material.textfield.TextInputLayout
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:layout_marginBottom="8dp"
                app:boxCornerRadiusBottomEnd="8dp"
                app:boxCornerRadiusBottomStart="8dp"
                app:boxCornerRadiusTopEnd="8dp"
                app:boxCornerRadiusTopStart="8dp"
                app:hintAnimationEnabled="true"
                app:startIconDrawable="@drawable/ic_round_dns_24">

                <AutoCompleteTextView
                    android:id="@+id/settingsAnilistTitleLanguage"
                    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/placeholder"
                    android:textAllCaps="true"
                    android:textColor="?android:attr/textColorSecondary"
                    android:textSize="14sp"
                    tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
            </com.google.android.material.textfield.TextInputLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/selected_staff_language" />

            <com.google.android.material.textfield.TextInputLayout
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:layout_marginBottom="8dp"
                app:boxCornerRadiusBottomEnd="8dp"
                app:boxCornerRadiusBottomStart="8dp"
                app:boxCornerRadiusTopEnd="8dp"
                app:boxCornerRadiusTopStart="8dp"
                app:hintAnimationEnabled="true"
                app:startIconDrawable="@drawable/ic_round_dns_24">

                <AutoCompleteTextView
                    android:id="@+id/settingsAnilistStaffLanguage"
                    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/placeholder"
                    android:textAllCaps="true"
                    android:textColor="?android:attr/textColorSecondary"
                    android:textSize="14sp"
                    tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
            </com.google.android.material.textfield.TextInputLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/selected_merge_time" />

            <com.google.android.material.textfield.TextInputLayout
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:layout_marginBottom="8dp"
                app:boxCornerRadiusBottomEnd="8dp"
                app:boxCornerRadiusBottomStart="8dp"
                app:boxCornerRadiusTopEnd="8dp"
                app:boxCornerRadiusTopStart="8dp"
                app:hintAnimationEnabled="true"
                app:startIconDrawable="@drawable/ic_round_dns_24">

                <AutoCompleteTextView
                    android:id="@+id/settingsAnilistActivityMergeTime"
                    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/placeholder"
                    android:textAllCaps="true"
                    android:textColor="?android:attr/textColorSecondary"
                    android:textSize="14sp"
                    tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
            </com.google.android.material.textfield.TextInputLayout>

            <ani.dantotsu.FadingEdgeRecyclerView
                android:id="@+id/settingsRecyclerView1"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginBottom="14dp"
                android:layout_marginHorizontal="32dp"
                android:nestedScrollingEnabled="false"
                android:requiresFadingEdge="vertical"
                tools:itemCount="2"
                tools:listitem="@layout/item_settings" />
        </ani.dantotsu.others.Xpandable>

        <ani.dantotsu.others.Xpandable
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="64dp"
            android:layout_marginTop="8dp"
            android:fontFamily="@font/poppins_bold"
            android:gravity="center_vertical"
            android:paddingHorizontal="32dp"
            android:text="@string/list_settings"
            android:textColor="?attr/colorSecondary"
            app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
            tools:ignore="TextContrastCheck" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/selected_score_format" />

            <com.google.android.material.textfield.TextInputLayout
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:layout_marginBottom="8dp"
                app:boxCornerRadiusBottomEnd="8dp"
                app:boxCornerRadiusBottomStart="8dp"
                app:boxCornerRadiusTopEnd="8dp"
                app:boxCornerRadiusTopStart="8dp"
                app:hintAnimationEnabled="true"
                app:startIconDrawable="@drawable/ic_round_dns_24">

                <AutoCompleteTextView
                    android:id="@+id/settingsAnilistScoreFormat"
                    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/placeholder"
                    android:textAllCaps="true"
                    android:textColor="?android:attr/textColorSecondary"
                    android:textSize="14sp"
                    tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
            </com.google.android.material.textfield.TextInputLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/selected_row_order" />

            <com.google.android.material.textfield.TextInputLayout
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:layout_marginBottom="8dp"
                app:boxCornerRadiusBottomEnd="8dp"
                app:boxCornerRadiusBottomStart="8dp"
                app:boxCornerRadiusTopEnd="8dp"
                app:boxCornerRadiusTopStart="8dp"
                app:hintAnimationEnabled="true"
                app:startIconDrawable="@drawable/ic_round_dns_24">

                <AutoCompleteTextView
                    android:id="@+id/settingsAnilistRowOrder"
                    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/placeholder"
                    android:textAllCaps="true"
                    android:textColor="?android:attr/textColorSecondary"
                    android:textSize="14sp"
                    tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
            </com.google.android.material.textfield.TextInputLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/custom_anime_list" />

            <LinearLayout
                android:id="@+id/animeCustomListsContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:orientation="vertical" />

            <ImageButton
                android:id="@+id/addAnimeListButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/custom_anime_list"
                android:layout_marginHorizontal="36dp"
                android:layout_marginVertical="12dp"
                android:src="@drawable/ic_circle_add"
                android:background="?android:attr/selectableItemBackground"
                app:tint="?attr/colorPrimary"/>


            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/custom_manga_list" />

            <LinearLayout
                android:id="@+id/mangaCustomListsContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:orientation="vertical" />

            <ImageButton
                android:id="@+id/addMangaListButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/custom_manga_list"
                android:layout_marginHorizontal="36dp"
                android:layout_marginVertical="12dp"
                android:src="@drawable/ic_circle_add"
                android:background="?android:attr/selectableItemBackground"
                app:tint="?attr/colorPrimary"/>

            <Button
                android:id="@+id/SettingsAnilistCustomListSave"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="32dp"
                android:layout_gravity="end"
                android:fontFamily="@font/poppins_bold"
                android:text="@string/save" />

        </ani.dantotsu.others.Xpandable>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/poppins_bold"
            android:gravity="center_vertical"
            android:paddingHorizontal="32dp"
            android:paddingTop="20dp"
            android:text="@string/other"
            android:textColor="?attr/colorSecondary"
            tools:ignore="TextContrastCheck" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:layout_marginHorizontal="32dp"
            android:fontFamily="@font/poppins_bold"
            android:text="@string/selected_time_zone" />

        <com.google.android.material.textfield.TextInputLayout
            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="32dp"
            android:layout_marginBottom="8dp"
            app:boxCornerRadiusBottomEnd="8dp"
            app:boxCornerRadiusBottomStart="8dp"
            app:boxCornerRadiusTopEnd="8dp"
            app:boxCornerRadiusTopStart="8dp"
            app:hintAnimationEnabled="true"
            app:startIconDrawable="@drawable/ic_round_dns_24">

            <AutoCompleteTextView
                android:id="@+id/settingsAnilistTimezone"
                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/placeholder"
                android:textAllCaps="true"
                android:textColor="?android:attr/textColorSecondary"
                android:textSize="14sp"
                tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
        </com.google.android.material.textfield.TextInputLayout>

        <ani.dantotsu.FadingEdgeRecyclerView
            android:id="@+id/settingsRecyclerView2"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginHorizontal="32dp"
            android:nestedScrollingEnabled="false"
            android:requiresFadingEdge="vertical"
            tools:itemCount="1"
            tools:listitem="@layout/item_settings" />
    </LinearLayout>
</androidx.core.widget.NestedScrollView>