<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:orientation="vertical">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@drawable/action_bar_bg"
        android:elevation="4dp"
        app:navigationIcon="?attr/homeAsUpIndicator" />

    <LinearLayout
        android:id="@+id/llContent"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:clipToPadding="false"
            android:fillViewport="true"
            android:paddingBottom="128dp"
            android:paddingTop="6dp"
            android:paddingHorizontal="12dp"
            android:scrollbarStyle="outsideOverlay"
            android:fadeScrollbars="false"
            tools:ignore="NestedWeights,TooManyViews">

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

                <View style="@style/setting_divider" />

                <TextView
                    style="@style/setting_row_label"
                    android:text="@string/account" />

                <TextView
                    android:id="@+id/tvAccount"
                    style="@style/setting_row_form" />

                <View style="@style/setting_divider" />

                <TextView
                    style="@style/setting_row_label"
                    android:labelFor="@+id/etTitle"
                    android:text="@string/filter_title" />

                <EditText
                    android:id="@+id/etTitle"
                    style="@style/setting_row_form"
                    android:importantForAutofill="no"
                    android:inputType="text" />

                <View style="@style/setting_divider" />

                <TextView
                    style="@style/setting_row_label"
                    android:text="@string/filter_phrase" />

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

                </LinearLayout>

                <Button
                    android:id="@+id/btnAddKeyword"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableStart="@drawable/ic_add"
                    android:drawableTint="?attr/colorTextContent"
                    android:text="@string/add_keyword_or_phrase"
                    android:textAllCaps="false" />

                <View style="@style/setting_divider" />

                <TextView
                    style="@style/setting_row_label"
                    android:text="@string/filter_action" />

                <RadioGroup
                    android:id="@+id/rgAction"
                    style="@style/setting_row_form"
                    android:orientation="vertical">

                    <RadioButton
                        android:id="@+id/rbWarn"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/filter_action_warn" />

                    <RadioButton
                        android:id="@+id/rbHide"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/filter_action_hide" />
                </RadioGroup>

                <View style="@style/setting_divider" />

                <TextView
                    style="@style/setting_row_label"
                    android:text="@string/filter_context" />

                <CheckBox
                    android:id="@+id/cbContextHome"
                    style="@style/setting_row_form"
                    android:checked="true"
                    android:text="@string/filter_home" />

                <CheckBox
                    android:id="@+id/cbContextNotification"
                    style="@style/setting_row_form"
                    android:checked="true"
                    android:text="@string/filter_notification" />

                <CheckBox
                    android:id="@+id/cbContextPublic"
                    style="@style/setting_row_form"
                    android:checked="true"
                    android:text="@string/filter_public" />

                <CheckBox
                    android:id="@+id/cbContextThread"
                    style="@style/setting_row_form"
                    android:checked="true"
                    android:text="@string/filter_thread" />

                <CheckBox
                    android:id="@+id/cbContextProfile"
                    style="@style/setting_row_form"
                    android:checked="true"
                    android:text="@string/filter_profile" />

                <View style="@style/setting_divider" />

                <TextView
                    style="@style/setting_row_label"
                    android:text="@string/filter_expires_at" />

                <TextView
                    android:id="@+id/tvExpire"
                    style="@style/setting_row_form" />

                <Spinner
                    android:id="@+id/spExpire"
                    style="@style/setting_row_form"
                    android:minHeight="40dp" />

                <View style="@style/setting_divider" />

            </LinearLayout>

        </ScrollView>

        <Button
            android:id="@+id/btnSave"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/save" />

    </LinearLayout>
</LinearLayout>
