<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
    <data>
        <variable
            name="viewModel"
            type="com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel" />
        <variable
            name="isClockVisible"
            type="Boolean" />
        <variable
            name="is24Format"
            type="Boolean" />
        <import type="android.view.View" />
        <variable
            name="isDarkModeEnabled"
            type="Boolean" />
    </data>
    <com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/scrollView"
        android:scrollbarThumbVertical="@color/colorPrimary">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="8dp"
            android:paddingBottom="48dp"
            android:focusable="true"
            android:orientation="vertical">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/clock_settings"
                android:alpha="@{isClockVisible ? 1f : 1f, default=1}"
                android:orientation="vertical">
                <androidx.appcompat.widget.AppCompatTextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/clock_text_header"
                    android:paddingTop="16dp"
                    android:paddingStart="20dp"
                    android:paddingEnd="20dp"
                    android:textAppearance="@style/AnotherWidget.Settings.Header" />
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingTop="12dp"
                    android:paddingBottom="12dp"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp"
                    android:clickable="true"
                    android:focusable="true"
                    android:background="?android:attr/selectableItemBackground"
                    android:gravity="center_vertical"
                    android:id="@+id/action_clock_text_size"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_text_fields_24"
                        app:tint="@color/colorPrimaryText"/>
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingLeft="8dp"
                        android:paddingRight="8dp"
                        android:orientation="vertical">
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            style="@style/AnotherWidget.Settings.Title"
                            android:text="@string/settings_clock_text_size_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/clock_text_size_label"
                            style="@style/AnotherWidget.Settings.Subtitle"/>
                    </LinearLayout>
                </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingTop="12dp"
                    android:paddingBottom="12dp"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp"
                    android:clickable="true"
                    android:focusable="true"
                    android:background="?android:attr/selectableItemBackground"
                    android:gravity="center_vertical"
                    android:id="@+id/action_clock_text_color"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_palette_24"
                        app:tint="@color/colorPrimaryText"/>
                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:layout_height="wrap_content"
                        android:paddingLeft="8dp"
                        android:paddingRight="8dp"
                        android:orientation="vertical">
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            style="@style/AnotherWidget.Settings.Title"
                            android:text="@string/settings_clock_text_color_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/clock_text_color_label"
                            style="@style/AnotherWidget.Settings.Subtitle"/>
                    </LinearLayout>
                    <androidx.cardview.widget.CardView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:visibility="@{isDarkModeEnabled ? View.VISIBLE : View.GONE}"
                        app:cardCornerRadius="16dp"
                        android:layout_gravity="center_vertical"
                        app:cardBackgroundColor="@color/cardBorder"
                        android:layout_marginEnd="8dp"
                        app:cardElevation="0dp">
                        <androidx.appcompat.widget.AppCompatTextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:textColor="@color/colorPrimaryText"
                            android:textSize="12sp"
                            android:paddingTop="4dp"
                            android:paddingBottom="4dp"
                            android:paddingStart="16dp"
                            android:paddingEnd="16dp"
                            android:textAppearance="@style/TextAppearance.AppCompat.Button"
                            android:text="@string/settings_subtitle_dark_theme_dark"/>
                    </androidx.cardview.widget.CardView>
                </LinearLayout>
                <androidx.appcompat.widget.AppCompatTextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/appearance_header"
                    android:paddingTop="16dp"
                    android:paddingStart="20dp"
                    android:paddingEnd="20dp"
                    android:visibility="@{is24Format ? View.GONE : View.VISIBLE, default=visible}"
                    android:textAppearance="@style/AnotherWidget.Settings.Header" />
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingTop="12dp"
                    android:paddingBottom="12dp"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp"
                    android:clickable="true"
                    android:focusable="true"
                    android:visibility="@{is24Format ? View.GONE : View.VISIBLE, default=visible}"
                    android:background="?android:attr/selectableItemBackground"
                    android:gravity="center_vertical"
                    android:id="@+id/action_ampm_indicator_size"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="10dp"
                        android:src="@drawable/round_text_rotate_vertical_24"
                        android:scaleX="-1"
                        app:tint="@color/colorPrimaryText"/>
                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:layout_height="wrap_content"
                        android:paddingLeft="8dp"
                        android:paddingRight="8dp"
                        android:orientation="vertical">
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            style="@style/AnotherWidget.Settings.Title"
                            android:text="@string/settings_ampm_indicator_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/ampm_indicator_label"
                            style="@style/AnotherWidget.Settings.Subtitle"/>
                    </LinearLayout>
                    <com.kyleduo.switchbutton.SwitchButton
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        app:kswThumbWidth="16sp"
                        app:kswThumbHeight="16sp"
                        app:kswBackRadius="16dp"
                        app:kswTintColor="@color/colorAccent"
                        android:layout_marginEnd="16dp"
                        android:id="@+id/ampm_indicator_toggle"
                        android:buttonTint="@color/colorAccent" />
                </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/small_clock_warning"
                    android:padding="10dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="24dp"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/outline_info_24"
                        app:tint="@color/colorSecondaryText"/>
                    <androidx.appcompat.widget.AppCompatTextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:duplicateParentState="true"
                        android:layout_marginTop="8dp"
                        android:paddingLeft="8dp"
                        android:paddingRight="8dp"
                        android:text="@string/clock_warning"
                        android:textColor="@color/colorSecondaryText"
                        android:letterSpacing="0"
                        android:fontFamily="@font/google_sans"
                        android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
                        app:textAllCaps="false" />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
</layout>