<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <data>
        <variable
            name="viewModel"
            type="com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel" />
        <variable
            name="isCalendarEnabled"
            type="Boolean" />
        <variable
            name="isDiffEnabled"
            type="Boolean" />
    </data>

    <com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
        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:orientation="vertical">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/calendar_settings"
                android:alpha="@{isCalendarEnabled ? 1f : 1f, default=1}"
                android:orientation="vertical">
                <androidx.appcompat.widget.AppCompatTextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/filters_header"
                    android:paddingTop="16dp"
                    android:paddingLeft="20dp"
                    android:paddingRight="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_filter_calendar"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_filter_list_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_filter_calendar_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/settings_filter_calendar_subtitle"
                            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_show_all_day"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_date_range_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_all_day_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/all_day_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/show_all_day_toggle"
                        android:buttonTint="@color/colorAccent" />
                </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_change_attendee_filter"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_event_busy_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_attendee_status_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            style="@style/AnotherWidget.Settings.Subtitle"
                            android:text="@string/settings_attendee_status_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_show_only_busy_events"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_work_outline_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_busy_events_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            style="@style/AnotherWidget.Settings.Subtitle"
                            android:text="@string/settings_busy_events_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/show_only_busy_events_toggle"
                        android:buttonTint="@color/colorAccent" />
                </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_show_until"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_redo_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_show_until_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/show_until_label"
                            style="@style/AnotherWidget.Settings.Subtitle"/>
                    </LinearLayout>
                </LinearLayout>
                <androidx.appcompat.widget.AppCompatTextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/event_detail_header"
                    android:paddingTop="16dp"
                    android:paddingLeft="20dp"
                    android:paddingRight="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_show_diff_time"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_timelapse"
                        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_show_diff_time_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/show_diff_time_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/show_diff_time_toggle"
                        android:buttonTint="@color/colorAccent" />
                </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:alpha="@{isDiffEnabled ? 1f : 0.2f, default=1}"
                    android:background="?android:attr/selectableItemBackground"
                    android:gravity="center_vertical"
                    android:id="@+id/action_widget_update_frequency"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_update"
                        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_widget_update_frequency_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/widget_update_frequency_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_second_row_info"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:padding="12dp"
                        android:src="@drawable/round_low_priority_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_second_row_info_title"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/second_row_info_label"
                            style="@style/AnotherWidget.Settings.Subtitle"/>
                    </LinearLayout>
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
</layout>