<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="1"
    tools:context=".fragments.SettingsFragment">

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

        <!-- General -->

        <com.google.android.material.card.MaterialCardView
            style="@style/Widget.MaterialComponents.CardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/activity_vertical_margin"
            android:layout_marginStart="@dimen/activity_horizontal_margin"
            android:layout_marginEnd="@dimen/activity_horizontal_margin"
            app:contentPadding="@dimen/activity_vertical_margin"
            app:cardElevation="@dimen/card_elevation"
            app:cardCornerRadius="@dimen/card_radius">

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/title__general"
                    android:textAppearance="@style/TextAppearance.Bitsy.Subtitle1"
                    android:textStyle="bold"/>

                <androidx.appcompat.widget.SwitchCompat
                    android:id="@+id/switchAutoClose"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_different_topic"
                    app:switchPadding="12dp"
                    android:text="@string/msg__close_timer"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"
                    android:textColor="?android:textColorPrimary"/>

                <androidx.appcompat.widget.SwitchCompat
                    android:id="@+id/switchNightMode"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_same_topic"
                    android:text="@string/msg__night_mode"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"
                    android:textColor="?android:textColorPrimary"/>

                <TextView
                    android:id="@+id/tvNetworkStatus"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_same_topic"
                    android:layout_marginEnd="2dp"
                    android:text="@string/text__view_network_status"
                    android:gravity="center_vertical"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"
                    android:drawableEnd="@drawable/ic_disconnected"/>

            </LinearLayout>

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

        <!-- Security -->

        <com.google.android.material.card.MaterialCardView
            style="@style/Widget.MaterialComponents.CardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/activity_vertical_margin"
            android:layout_marginStart="@dimen/activity_horizontal_margin"
            android:layout_marginEnd="@dimen/activity_horizontal_margin"
            app:contentPadding="@dimen/activity_vertical_margin"
            app:cardElevation="@dimen/card_elevation"
            app:cardCornerRadius="@dimen/card_radius">

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/title__security"
                    android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
                    android:textStyle="bold"/>

                <TextView
                    android:id="@+id/tvSecurityLock"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_different_topic"
                    android:text="@string/text__security_lock"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>

                <TextView
                    android:id="@+id/tvSecurityLockSelected"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingTop="4dp"
                    tools:text="PIN"
                    android:textSize="16sp"/>

            </LinearLayout>

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

        <!-- Backup -->

        <com.google.android.material.card.MaterialCardView
            style="@style/Widget.MaterialComponents.CardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/activity_vertical_margin"
            android:layout_marginStart="@dimen/activity_horizontal_margin"
            android:layout_marginEnd="@dimen/activity_horizontal_margin"
            app:contentPadding="@dimen/activity_vertical_margin"
            app:cardElevation="@dimen/card_elevation"
            app:cardCornerRadius="@dimen/card_radius">

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/title__backup"
                    android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
                    android:textStyle="bold"/>

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_different_topic"
                    android:text="@string/msg__brainkey_description"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnViewBrainKey"
                    style="@style/Widget.Bitsy.Button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_same_topic"
                    android:text="@string/button__view_and_copy"/>

                <TextView
                    android:id="@+id/tvBackupWarning"
                    style="@style/TextAppearance.Bitsy.Body2.Error"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_same_topic"
                    android:drawableStart="@drawable/ic_error"
                    android:gravity="center"
                    android:visibility="gone"
                    android:text="@string/msg__backup_warning"
                    android:textStyle="bold"/>

            </LinearLayout>

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

        <!-- Accounts -->

        <com.google.android.material.card.MaterialCardView
            style="@style/Widget.MaterialComponents.CardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/activity_vertical_margin"
            android:layout_marginStart="@dimen/activity_horizontal_margin"
            android:layout_marginEnd="@dimen/activity_horizontal_margin"
            app:contentPadding="@dimen/activity_vertical_margin"
            app:cardElevation="@dimen/card_elevation"
            app:cardCornerRadius="@dimen/card_radius">

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/title__accounts"
                    android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
                    android:textStyle="bold"/>

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_different_topic"
                    android:text="@string/msg__upgrade_to_ltm"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnUpgradeToLTM"
                    style="@style/Widget.Bitsy.Button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_same_topic"
                    android:text="@string/button__upgrade_to_ltm"/>

                <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/spacing_different_topic"
                        android:text="@string/msg__remove_current_account"
                        android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>

                <com.google.android.material.button.MaterialButton
                        android:id="@+id/btnRemoveAccount"
                        style="@style/Widget.Bitsy.Button"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/spacing_same_topic"
                        android:backgroundTint="@color/red"
                        android:text="@string/button__remove"/>

            </LinearLayout>

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

        <!-- Earn more BTS! -->

        <com.google.android.material.card.MaterialCardView
            style="@style/Widget.MaterialComponents.CardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/activity_vertical_margin"
            android:layout_marginBottom="@dimen/activity_vertical_margin"
            android:layout_marginStart="@dimen/activity_horizontal_margin"
            android:layout_marginEnd="@dimen/activity_horizontal_margin"
            app:contentPadding="@dimen/activity_vertical_margin"
            app:cardElevation="@dimen/card_elevation"
            app:cardCornerRadius="@dimen/card_radius">

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

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/title__earn_more_bts"
                    android:textAppearance="@style/TextAppearance.Bitsy.Subtitle1"
                    android:textStyle="bold"/>

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_same_topic"
                    android:autoLink="all"
                    android:text="@string/msg__earn_more_bts"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_same_topic"
                    android:autoLink="all"
                    android:text="@string/msg__palmpay_link"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>

            </LinearLayout>

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

        <!-- Bugs or Ideas -->

        <com.google.android.material.card.MaterialCardView
            style="@style/Widget.MaterialComponents.CardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/activity_vertical_margin"
            android:layout_marginBottom="@dimen/activity_vertical_margin"
            android:layout_marginStart="@dimen/activity_horizontal_margin"
            android:layout_marginEnd="@dimen/activity_horizontal_margin"
            app:contentPadding="@dimen/activity_vertical_margin"
            app:cardElevation="@dimen/card_elevation"
            app:cardCornerRadius="@dimen/card_radius">

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

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/title__bugs_or_ideas"
                    android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
                    android:textStyle="bold"/>

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/spacing_same_topic"
                    android:autoLink="all"
                    android:lineSpacingExtra="8dp"
                    android:text="@string/msg__bugs_or_ideas"
                    android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>

            </LinearLayout>

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

    </LinearLayout>

</ScrollView>