<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen 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">

    <im.vector.app.core.preference.VectorPreferenceCategory
        android:key="SETTINGS_USER_SETTINGS_PREFERENCE_KEY"
        android:title="@string/settings_user_settings">

        <im.vector.app.core.preference.UserAvatarPreference
            android:key="SETTINGS_PROFILE_PICTURE_PREFERENCE_KEY"
            android:title="@string/settings_profile_picture" />

        <im.vector.app.core.preference.VectorEditTextPreference
            android:key="SETTINGS_DISPLAY_NAME_PREFERENCE_KEY"
            android:persistent="false"
            android:title="@string/settings_display_name" />

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_CHANGE_PASSWORD_PREFERENCE_KEY"
            android:summary="@string/change_password_summary"
            android:title="@string/settings_password" />

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_EMAILS_AND_PHONE_NUMBERS_PREFERENCE_KEY"
            android:summary="@string/settings_emails_and_phone_numbers_summary"
            android:title="@string/settings_emails_and_phone_numbers_title"
            app:fragment="im.vector.app.features.settings.threepids.ThreePidsSettingsFragment" />

        <im.vector.app.core.preference.VectorPreference
            android:persistent="false"
            android:summary="@string/settings_discovery_manage"
            android:title="@string/settings_discovery_category"
            app:fragment="im.vector.app.features.discovery.DiscoverySettingsFragment" />

    </im.vector.app.core.preference.VectorPreferenceCategory>

    <im.vector.app.core.preference.VectorPreferenceCategory
        android:key="SETTINGS_CONTACT_PREFERENCE_KEYS"
        android:title="@string/settings_contact"
        app:isPreferenceVisible="@bool/false_not_implemented">

        <im.vector.app.core.preference.VectorSwitchPreference
            android:key="CONTACT_BOOK_ACCESS_KEY"
            android:title="@string/settings_contacts_app_permission" />

        <im.vector.app.core.preference.VectorPreference
            android:dialogTitle="@string/settings_select_country"
            android:key="SETTINGS_CONTACTS_PHONEBOOK_COUNTRY_PREFERENCE_KEY"
            android:title="@string/settings_contacts_phonebook_country" />

    </im.vector.app.core.preference.VectorPreferenceCategory>

    <im.vector.app.core.preference.VectorPreferenceCategory android:title="@string/settings_integrations">

        <im.vector.app.core.preference.VectorPreference
            android:focusable="false"
            android:persistent="false"
            android:summary="@string/settings_integrations_summary" />

        <im.vector.app.core.preference.VectorSwitchPreference
            android:key="SETTINGS_ALLOW_INTEGRATIONS_KEY"
            android:persistent="false"
            android:title="@string/settings_integration_allow" />

        <im.vector.app.core.preference.VectorPreference
            android:dependency="SETTINGS_ALLOW_INTEGRATIONS_KEY"
            android:key="SETTINGS_INTEGRATION_MANAGER_UI_URL_KEY"
            android:persistent="false"
            android:title="@string/settings_integration_manager" />

    </im.vector.app.core.preference.VectorPreferenceCategory>

    <im.vector.app.core.preference.VectorPreferenceCategory android:title="@string/settings_advanced">

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_LOGGED_IN_PREFERENCE_KEY"
            android:title="@string/settings_logged_in"
            tools:summary="\@user:matrix.org" />

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_HOME_SERVER_PREFERENCE_KEY"
            android:title="@string/settings_home_server"
            app:fragment="im.vector.app.features.settings.homeserver.HomeserverSettingsFragment"
            tools:summary="https://homeserver.org" />

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY"
            android:title="@string/settings_identity_server"
            app:fragment="im.vector.app.features.discovery.DiscoverySettingsFragment"
            tools:summary="https://identity.server.url" />

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY"
            android:title="@string/settings_clear_media_cache" />

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_CLEAR_CACHE_PREFERENCE_KEY"
            android:title="@string/settings_clear_cache" />

    </im.vector.app.core.preference.VectorPreferenceCategory>

    <im.vector.app.core.preference.VectorPreferenceCategory android:title="@string/action_sign_out">

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_SIGN_OUT_KEY"
            android:title="@string/action_sign_out" />

    </im.vector.app.core.preference.VectorPreferenceCategory>

    <im.vector.app.core.preference.VectorPreferenceCategory android:title="@string/settings_deactivate_account_section">

        <im.vector.app.core.preference.VectorPreference
            android:key="SETTINGS_DEACTIVATE_ACCOUNT_KEY"
            android:persistent="false"
            android:title="@string/settings_deactivate_my_account"
            app:fragment="im.vector.app.features.settings.account.deactivation.DeactivateAccountFragment" />

    </im.vector.app.core.preference.VectorPreferenceCategory>

</androidx.preference.PreferenceScreen>