<?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">

    <!--
        WARNING: All the preferences in this page get a prefix added programmatically
        by AbstractAutoExportSettingsFragment
    -->

    <SwitchPreferenceCompat
        android:defaultValue="false"
        android:icon="@drawable/ic_toggle_on"
        android:key="auto_export_enabled"
        android:layout="@layout/preference_checkbox"
        android:title="@string/pref_title_auto_export_enabled"
        app:iconSpaceReserved="false" />
    <Preference
        android:dependency="auto_export_enabled"
        android:icon="@drawable/ic_file_export"
        android:key="auto_export_location"
        android:title="@string/pref_title_auto_export_location"
        app:iconSpaceReserved="false" />
    <EditTextPreference
        android:defaultValue="3"
        android:dependency="auto_export_enabled"
        android:icon="@drawable/ic_timer"
        android:inputType="number"
        android:key="auto_export_interval"
        android:maxLength="3"
        android:summary="@string/pref_summary_auto_export_interval"
        android:title="@string/pref_title_auto_export_interval"
        app:iconSpaceReserved="false" />

    <nodomain.freeyourgadget.gadgetbridge.util.XTimePreference
        android:defaultValue="00:00"
        android:dependency="auto_export_enabled"
        android:icon="@drawable/ic_access_time"
        android:key="auto_export_start_time"
        android:title="@string/mi2_prefs_do_not_disturb_start" />

    <PreferenceCategory
        android:key="pref_header_status"
        android:title="@string/status">

        <Preference
            android:icon="@drawable/ic_info"
            android:key="auto_export_status"
            android:summary="@string/unknown"
            android:title="@string/status" />

        <Preference
            android:icon="@drawable/ic_access_time"
            android:key="auto_export_last_execution"
            android:summary="@string/unknown"
            android:title="@string/auto_export_last_execution" />

        <Preference
            android:icon="@drawable/ic_access_time"
            android:key="auto_export_next_execution"
            android:summary="@string/unknown"
            android:title="@string/auto_export_next_execution" />

    </PreferenceCategory>

    <PreferenceCategory
        android:key="pref_header_test"
        android:title="@string/test">

        <Preference
            android:dependency="auto_export_enabled"
            android:icon="@drawable/ic_play"
            android:key="auto_export_run_now"
            android:title="@string/activity_DB_test_export_button" />

    </PreferenceCategory>

</PreferenceScreen>
