<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <androidx.preference.Preference
        app:allowDividerBelow="false"
        android:key="@string/pref_key_sign_in"
        android:layout="@layout/sign_in_preference"
        android:summary="@string/preferences_sign_in_description"
        android:title="@string/preferences_sync" />

    <androidx.preference.PreferenceCategory
        android:key="@string/pref_key_account_category"
        android:title="@string/preferences_category_account"
        app:iconSpaceReserved="false"
        app:isPreferenceVisible="false">

        <org.mozilla.fenix.settings.account.AccountPreference
            android:icon="@drawable/ic_account"
            android:key="@string/pref_key_account" />

        <org.mozilla.fenix.settings.account.AccountAuthErrorPreference
            android:icon="@drawable/ic_account_warning"
            android:key="@string/pref_key_account_auth_error"/>
    </androidx.preference.PreferenceCategory>

    <androidx.preference.PreferenceCategory
        android:title="@string/preferences_category_basics"
        app:iconSpaceReserved="false">
        <androidx.preference.Preference
            android:icon="@drawable/ic_search"
            android:key="@string/pref_key_search_settings"
            android:title="@string/preferences_search" />

        <androidx.preference.Preference
            android:icon="@drawable/ic_customize"
            android:key="@string/pref_key_theme"
            android:title="@string/preferences_theme" />

        <androidx.preference.Preference
            android:icon="@drawable/ic_accessibility"
            android:key="@string/pref_key_accessibility"
            android:title="@string/preferences_accessibility" />

        <androidx.preference.Preference
            android:icon="@drawable/ic_internet"
            android:key="@string/pref_key_make_default_browser"
            android:title="@string/preferences_set_as_default_browser" />

        <androidx.preference.Preference
            android:key="@string/pref_key_toolbar"
            android:title="@string/preferences_toolbar" />
    </androidx.preference.PreferenceCategory>

    <androidx.preference.PreferenceCategory
        android:title="@string/preferences_category_privacy"
        app:iconSpaceReserved="false">
        <androidx.preference.Preference
            android:icon="@drawable/ic_tracking_protection_enabled"
            android:key="@string/pref_key_tracking_protection_settings"
            android:title="@string/preference_enhanced_tracking_protection" />
        <androidx.preference.Preference
            app:isPreferenceVisible="false"
            android:icon="@drawable/ic_login"
            android:key="@string/pref_key_passwords"
            android:title="@string/preferences_passwords_logins_and_passwords" />
        <androidx.preference.Preference
            android:icon="@drawable/ic_private_browsing"
            android:key="@string/pref_key_add_private_browsing_shortcut"
            android:title="@string/preferences_add_private_browsing_shortcut"/>
        <androidx.preference.Preference
            android:icon="@drawable/ic_permission"
            android:key="@string/pref_key_site_permissions"
            android:title="@string/preferences_site_permissions" />
        <androidx.preference.Preference
            android:icon="@drawable/ic_delete"
            android:key="@string/pref_key_delete_browsing_data"
            android:title="@string/preferences_delete_browsing_data" />
        <androidx.preference.Preference
            android:icon="@drawable/ic_exit"
            android:key="@string/pref_key_delete_browsing_data_on_quit_preference"
            android:title="@string/preferences_delete_browsing_data_on_quit" />
        <androidx.preference.Preference
            android:icon="@drawable/ic_data_collection"
            android:key="@string/pref_key_data_choices"
            android:title="@string/preferences_data_collection" />
        <androidx.preference.SwitchPreference
            android:defaultValue="false"
            android:icon="@drawable/ic_app_links"
            android:key="@string/pref_key_open_links_in_external_app"
            android:title="@string/preferences_open_links_in_apps" />
        <androidx.preference.SwitchPreference
            android:defaultValue="false"
            android:icon="@drawable/ic_info"
            android:key="@string/pref_key_leakcanary"
            android:title="@string/preference_leakcanary"
            app:isPreferenceVisible="@bool/IS_DEBUG" />
    </androidx.preference.PreferenceCategory>

    <PreferenceCategory
        android:title="@string/preferences_category_advanced"
        app:iconSpaceReserved="false"
        android:key="@string/pref_key_advanced"
        app:isPreferenceVisible="false">
        <androidx.preference.Preference
            android:icon="@drawable/ic_language"
            android:key="@string/pref_key_language"
            android:title="@string/preferences_language" />
    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/developer_tools_category"
        app:iconSpaceReserved="false">
        <androidx.preference.SwitchPreference
            android:icon="@drawable/ic_energy"
            android:key="@string/pref_key_remote_debugging"
            android:title="@string/preferences_remote_debugging"
            android:defaultValue="false" />
    </PreferenceCategory>

    <androidx.preference.PreferenceCategory
        android:title="@string/preferences_category_about"
        app:iconSpaceReserved="false">
        <androidx.preference.Preference
            android:icon="@drawable/ic_bookmark_outline"
            android:key="@string/pref_key_rate"
            android:title="@string/preferences_rate" />
        <androidx.preference.Preference
            android:icon="@drawable/ic_info"
            android:key="@string/pref_key_about"
            android:title="@string/preferences_about" />
    </androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>
