<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?attr/primaryBackgroundColor">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingTop="@dimen/dimen6dp"
        android:paddingBottom="@dimen/dimen12dp">

        <View
            android:layout_width="@dimen/dimen32dp"
            android:layout_height="@dimen/dimen6dp"
            android:layout_gravity="center_horizontal"
            android:layout_marginBottom="@dimen/dimen8dp"
            android:background="@drawable/bottom_sheet_handle"
            android:backgroundTint="?attr/primaryTextColor" />

        <LinearLayout
            android:id="@+id/headerFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="@dimen/dimen8dp">

            <TextView
                android:id="@+id/bottomSheetHeader"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/settingsAppearanceHeader"
                android:textColor="?attr/primaryTextColor"
                android:textSize="@dimen/dimen18sp"/>

            <com.google.android.material.card.MaterialCardView
                style="?attr/materialCardViewFilledStyle"
                android:layout_width="@dimen/dimen28dp"
                android:layout_height="@dimen/dimen4dp"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="@dimen/dimen8dp"
                android:layout_marginBottom="@dimen/dimen16dp"
                app:cardCornerRadius="@dimen/dimen24dp"
                app:cardElevation="@dimen/dimen0dp">

                <View
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="?attr/fabColor" />

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

        </LinearLayout>

        <LinearLayout
            android:id="@+id/themeSelectionFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp"
            android:orientation="vertical">

            <TextView
                android:id="@+id/themeHeaderSelector"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/themeSelectionHeaderText"
                android:textColor="?attr/primaryTextColor"
                android:textSize="@dimen/dimen16sp" />

            <com.google.android.material.chip.ChipGroup
                android:id="@+id/themeChipGroup"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen8dp"
                app:singleSelection="true"
                app:selectionRequired="true" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/lightThemeTimeSelectionFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp"
            android:orientation="vertical"
            android:visibility="gone">

            <TextView
                android:id="@+id/lightThemeTimeHeaderSelector"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/settingsLightThemeTimeSelectorHeader"
                android:textColor="?attr/primaryTextColor"
                android:textSize="@dimen/dimen16sp" />

            <TextView
                android:id="@+id/lightThemeSelectedTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen4dp"
                android:text="@string/settingsThemeTimeSelectedHint"
                android:textColor="?attr/selectedTextColor"
                android:textSize="@dimen/dimen14sp" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/darkThemeTimeSelectionFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp"
            android:orientation="vertical"
            android:visibility="gone">

            <TextView
                android:id="@+id/darkThemeTimeHeaderSelector"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/settingsDarkThemeTimeSelectorHeader"
                android:textColor="?attr/primaryTextColor"
                android:textSize="@dimen/dimen16sp" />

            <TextView
                android:id="@+id/darkThemeSelectedTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen4dp"
                android:text="@string/settingsThemeTimeSelectedHint"
                android:textColor="?attr/selectedTextColor"
                android:textSize="@dimen/dimen14sp" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/customFontFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp"
            android:orientation="vertical">

            <TextView
                android:id="@+id/customFontHeaderSelector"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/settingsCustomFontHeaderText"
                android:textColor="?attr/primaryTextColor"
                android:textSize="@dimen/dimen16sp" />

            <com.google.android.material.chip.ChipGroup
                android:id="@+id/customFontChipGroup"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen8dp"
                app:singleSelection="true"
                app:selectionRequired="true" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fragmentTabsAnimationFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp"
            android:orientation="vertical">

            <TextView
                android:id="@+id/fragmentTabsAnimationFrameHeaderSelector"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/fragmentTabsAnimationHeader"
                android:textColor="?attr/primaryTextColor"
                android:textSize="@dimen/dimen16sp" />

            <com.google.android.material.chip.ChipGroup
                android:id="@+id/fragmentTabsAnimationChipGroup"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen8dp"
                app:singleSelection="true"
                app:selectionRequired="true" />

        </LinearLayout>

        <!-- Counter Badge Frame -->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/counterBadgeFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp">

            <TextView
                android:id="@+id/tvCounterBadgeHeader"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="@string/settingsCounterBadges"
                android:textColor="?attr/primaryTextColor"
                android:layout_marginTop="@dimen/dimen8dp"
                android:textSize="@dimen/dimen16sp"
                android:singleLine="false"
                android:ellipsize="none"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toStartOf="@id/guidelineCounter"
                app:layout_constraintTop_toTopOf="parent"
                android:layout_marginEnd="@dimen/dimen12dp" />

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/switchCounterBadge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/settingsCounterBadges"
                style="@style/m3SwitchStyle"
                app:layout_constraintStart_toEndOf="@id/tvCounterBadgeHeader"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tvCounterBadgeHeader"
                app:layout_constraintBottom_toBottomOf="@id/tvCounterBadgeHeader" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guidelineCounter"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.85" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <!-- Labels in List Frame -->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/labelsInListFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp">

            <TextView
                android:id="@+id/tvLabelsInListHeader"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="@string/settingsLabelsInListHeader"
                android:textColor="?attr/primaryTextColor"
                android:layout_marginTop="@dimen/dimen8dp"
                android:textSize="@dimen/dimen16sp"
                android:singleLine="false"
                android:ellipsize="none"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toStartOf="@id/guidelineLabels"
                app:layout_constraintTop_toTopOf="parent"
                android:layout_marginEnd="@dimen/dimen12dp" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen4dp"
                android:text="@string/settingsLabelsInListHint"
                android:textColor="?attr/hintColor"
                android:textSize="@dimen/dimen12sp"
                android:layout_marginEnd="@dimen/dimen12dp"
                app:layout_constraintStart_toStartOf="@id/tvLabelsInListHeader"
                app:layout_constraintTop_toBottomOf="@id/tvLabelsInListHeader"
                app:layout_constraintEnd_toStartOf="@id/guidelineLabels" />

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/switchLabelsInListBadge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/settingsLabelsInListHeader"
                style="@style/m3SwitchStyle"
                app:layout_constraintStart_toEndOf="@id/tvLabelsInListHeader"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tvLabelsInListHeader"
                app:layout_constraintBottom_toBottomOf="@id/tvLabelsInListHeader" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guidelineLabels"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.85" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <!-- Hide Email/Lang in Profile Frame -->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/hideEmailLangInProfileFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp">

            <TextView
                android:id="@+id/tvHideEmailLangInProfileHeader"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="@string/hideEmailLangInProfileHeader"
                android:textColor="?attr/primaryTextColor"
                android:layout_marginTop="@dimen/dimen8dp"
                android:textSize="@dimen/dimen16sp"
                android:singleLine="false"
                android:ellipsize="none"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toStartOf="@id/guidelineProfile"
                app:layout_constraintTop_toTopOf="parent"
                android:layout_marginEnd="@dimen/dimen12dp" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen4dp"
                android:text="@string/hideEmailLangInProfileHint"
                android:textColor="?attr/hintColor"
                android:textSize="@dimen/dimen12sp"
                android:layout_marginEnd="@dimen/dimen12dp"
                app:layout_constraintStart_toStartOf="@id/tvHideEmailLangInProfileHeader"
                app:layout_constraintTop_toBottomOf="@id/tvHideEmailLangInProfileHeader"
                app:layout_constraintEnd_toStartOf="@id/guidelineProfile" />

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/switchHideEmailLangInProfile"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/hideEmailLangInProfileHeader"
                style="@style/m3SwitchStyle"
                app:layout_constraintStart_toEndOf="@id/tvHideEmailLangInProfileHeader"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tvHideEmailLangInProfileHeader"
                app:layout_constraintBottom_toBottomOf="@id/tvHideEmailLangInProfileHeader" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guidelineProfile"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.85" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <!-- Hide Email in Nav Drawer Frame -->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/hideEmailNavDrawerFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp">

            <TextView
                android:id="@+id/tvHideEmailNavDrawerHeader"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="@string/hideEmailNavDrawerHeader"
                android:textColor="?attr/primaryTextColor"
                android:layout_marginTop="@dimen/dimen8dp"
                android:textSize="@dimen/dimen16sp"
                android:singleLine="false"
                android:ellipsize="none"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toStartOf="@id/guidelineEmail"
                app:layout_constraintTop_toTopOf="parent"
                android:layout_marginEnd="@dimen/dimen12dp" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen4dp"
                android:text="@string/hideEmailNavDrawerHint"
                android:textColor="?attr/hintColor"
                android:textSize="@dimen/dimen12sp"
                android:layout_marginEnd="@dimen/dimen12dp"
                app:layout_constraintStart_toStartOf="@id/tvHideEmailNavDrawerHeader"
                app:layout_constraintTop_toBottomOf="@id/tvHideEmailNavDrawerHeader"
                app:layout_constraintEnd_toStartOf="@id/guidelineEmail" />

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/switchHideEmailNavDrawer"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/hideEmailNavDrawerHeader"
                style="@style/m3SwitchStyle"
                app:layout_constraintStart_toEndOf="@id/tvHideEmailNavDrawerHeader"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tvHideEmailNavDrawerHeader"
                app:layout_constraintBottom_toBottomOf="@id/tvHideEmailNavDrawerHeader" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guidelineEmail"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.85" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <LinearLayout
            android:id="@+id/langFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:paddingStart="@dimen/dimen16dp"
            android:paddingEnd="@dimen/dimen16dp"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tvLanguageHeaderSelector"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/settingsLanguageSelectorHeader"
                android:textColor="?attr/primaryTextColor"
                android:textSize="@dimen/dimen16sp" />

            <TextView
                android:id="@+id/tvLanguageSelected"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimen4dp"
                android:text="@string/settingsLanguageSelectedHeaderDefault"
                android:textColor="?attr/selectedTextColor"
                android:textSize="@dimen/dimen14sp" />

        </LinearLayout>

        <TextView
            android:id="@+id/helpTranslate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimen24dp"
            android:layout_marginBottom="@dimen/dimen16dp"
            android:layout_marginStart="@dimen/dimen16dp"
            android:layout_marginEnd="@dimen/dimen16dp"
            android:background="?android:attr/selectableItemBackground"
            android:text="@string/settingsHelpTranslateText"
            android:textColor="@color/lightBlue"
            android:textSize="@dimen/dimen16sp" />

    </LinearLayout>

</androidx.core.widget.NestedScrollView>
