<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <PreferenceCategory android:title="Theme">
        <SwitchPreferenceCompat
            android:icon="@drawable/ic_palette_24dp"
            android:key="dynamic_colors"
            android:summary="@string/pref_dynamic_colors_summary"
            android:title="@string/pref_dynamic_colors" />
        <ListPreference
            android:defaultValue="@string/theme"
            android:entries="@array/themes"
            android:entryValues="@array/themes_values"
            android:icon="@drawable/ic_dark_mode_24dp"
            android:key="theme"
            android:title="Theme"
            app:useSimpleSummaryProvider="true" />
        <SwitchPreferenceCompat
            android:defaultValue="true"
            android:icon="@drawable/ic_dark_mode_24dp"
            android:key="custom_theme_automatic"
            android:title="Follow System Dark Mode" />
        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:icon="@drawable/ic_dark_mode_24dp"
            android:key="custom_theme_dark"
            android:title="Custom Theme is Dark" />
        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_theme_color_match"
            android:title="Color Match"
            android:summary="Stay true to my color inputs" />
        <com.rarepebble.colorpicker.ColorPreference
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_theme_primary"
            android:title="Custom Primary Color"
            android:defaultValue="@color/md_theme_light_primary"
            app:colorpicker_showAlpha="false" />
        <com.rarepebble.colorpicker.ColorPreference
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_theme_primary_dark"
            android:title="Custom Secondary Color"
            android:defaultValue="@color/md_theme_light_secondary"
            app:colorpicker_showAlpha="false" />
        <com.rarepebble.colorpicker.ColorPreference
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_theme_accent"
            android:title="Custom Tertiary Color"
            android:defaultValue="@color/md_theme_light_tertiary"
            app:colorpicker_showAlpha="false" />
        <com.rarepebble.colorpicker.ColorPreference
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_theme_background_primary"
            android:title="Custom Background Color"
            android:defaultValue="@color/md_theme_light_surface"
            app:colorpicker_showAlpha="false" />
        <com.rarepebble.colorpicker.ColorPreference
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_dark_theme_primary"
            android:title="Custom Primary Color"
            android:defaultValue="@color/md_theme_dark_primary"
            app:colorpicker_showAlpha="false" />
        <com.rarepebble.colorpicker.ColorPreference
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_dark_theme_primary_dark"
            android:title="Custom Secondary Color"
            android:defaultValue="@color/md_theme_dark_secondary"
            app:colorpicker_showAlpha="false" />
        <com.rarepebble.colorpicker.ColorPreference
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_dark_theme_accent"
            android:title="Custom Tertiary Color"
            android:defaultValue="@color/md_theme_dark_tertiary"
            app:colorpicker_showAlpha="false" />
        <com.rarepebble.colorpicker.ColorPreference
            android:icon="@drawable/ic_palette_24dp"
            android:key="custom_dark_theme_background_primary"
            android:title="Custom Background Color"
            android:defaultValue="@color/md_theme_dark_surface"
            app:colorpicker_showAlpha="false" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/appearance">
        <Preference
            android:icon="@drawable/ic_forum_24dp"
            app:fragment="eu.siacs.conversations.ui.fragment.settings.InterfaceBubblesSettingsFragment"
            app:summary="@string/pref_chat_bubbles_summary"
            app:title="@string/pref_chat_bubbles" />
        <SwitchPreferenceCompat
            android:defaultValue="@bool/show_dynamic_tags"
            android:icon="@drawable/ic_label_24dp"
            android:key="show_dynamic_tags"
            android:summary="@string/pref_show_dynamic_tags_summary"
            android:title="@string/pref_show_dynamic_tags" />
        <SwitchPreferenceCompat
            android:defaultValue="@bool/show_link_previews"
            android:icon="@drawable/ic_link_24dp"
            android:key="show_link_previews"
            android:summary="When a sender has included link descriptions, show them"
            android:title="Show Link Previews" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/pref_category_operating_system">
        <SwitchPreferenceCompat
            android:defaultValue="@bool/allow_screenshots"
            android:icon="@drawable/ic_screenshot_24dp"
            android:key="allow_screenshots"
            android:summary="@string/pref_allow_screenshots_summary"
            android:title="@string/pref_allow_screenshots" />
        <SwitchPreferenceCompat
            android:defaultValue="@bool/default_custom_tab"
            android:icon="@drawable/ic_link_24dp"
            android:key="custom_tab"
            android:summary="@string/pref_custom_tab_summary"
            android:title="@string/pref_custom_tab" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/pref_input_options">
        <ListPreference
            android:defaultValue="@string/quick_action"
            android:dialogTitle="@string/choose_quick_action"
            android:entries="@array/quick_actions"
            android:entryValues="@array/quick_action_values"
            android:icon="@drawable/ic_send_time_extension_24dp"
            android:key="quick_action"
            android:summary="@string/pref_quick_action_summary"
            android:title="@string/pref_quick_action" />
        <SwitchPreferenceCompat
            android:defaultValue="@bool/scroll_to_bottom"
            android:icon="@drawable/ic_vertical_align_bottom_24dp"
            android:key="scroll_to_bottom"
            android:summary="@string/pref_scroll_to_bottom_summary"
            android:title="@string/pref_scroll_to_bottom" />
        <SwitchPreferenceCompat
            android:defaultValue="@bool/start_searching"
            android:icon="@drawable/ic_search_24dp"
            android:key="start_searching"
            android:summary="@string/pref_start_search_summary"
            android:title="@string/pref_start_search" />
        <SwitchPreferenceCompat
            android:icon="@drawable/ic_replay_24dp"
            android:defaultValue="@bool/follow_thread_in_channel"
            android:key="follow_thread_in_channel"
            android:summary="@string/pref_follow_thread_in_channel_summary"
            android:title="@string/pref_follow_thread_in_channel" />
        <SwitchPreferenceCompat
            android:icon="@drawable/ic_mood_24dp"
            android:defaultValue="@bool/message_autocomplete"
            android:key="message_autocomplete"
            android:summary="@string/pref_message_autocomplete_summary"
            android:title="@string/pref_message_autocomplete" />
        <SwitchPreferenceCompat
            android:icon="@drawable/ic_format_size_24dp"
            android:defaultValue="@bool/compose_rich_text"
            android:key="compose_rich_text"
            android:summary="The message editor will show formatting as you type"
            android:title="Compose using rich text" />
        <SwitchPreferenceCompat
            android:icon="@drawable/ic_announcement_24dp"
            android:defaultValue="@bool/show_muc_pm"
            android:key="show_muc_pm"
            android:summary="Allow starting semi-private chats inside a channel"
            android:title="Show Channel PM" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/pref_keyboard_options">
        <SwitchPreferenceCompat
            android:defaultValue="@bool/display_enter_key"
            android:icon="@drawable/ic_keyboard_return_24dp"
            android:key="display_enter_key"
            android:summary="@string/pref_display_enter_key_summary"
            android:title="@string/pref_display_enter_key" />
        <SwitchPreferenceCompat
            android:defaultValue="@bool/enter_is_send"
            android:icon="@drawable/ic_send_24dp"
            android:key="enter_is_send"
            android:summary="@string/pref_enter_is_send_summary"
            android:title="@string/pref_enter_is_send" />
    </PreferenceCategory>
</PreferenceScreen>
