<?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="@string/source">

        <Preference
            app:icon="@drawable/ic_info"
            app:key="ytdl-version"
            app:title="@string/ytdl_version"/>

        <Preference
            app:icon="@drawable/ic_update"
            app:key="update_ytdl"
            app:summary="@string/ytdl_update_hint"
            app:title="@string/update_ytdl" />

        <ListPreference
            android:defaultValue="stable"
            android:entries="@array/ytdlp_source"
            android:entryValues="@array/ytdlp_source_values"
            android:icon="@drawable/baseline_source_24"
            app:key="ytdlp_source"
            app:useSimpleSummaryProvider="true"
            app:title="@string/ytdl_source" />



        <SwitchPreferenceCompat
            android:widgetLayout="@layout/preferece_material_switch"
            app:defaultValue="true"
            app:icon="@drawable/ic_update"
            android:key="auto_update_ytdlp"
            app:title="@string/auto_update_ytdlp" />

    </PreferenceCategory>

    <PreferenceCategory android:title="@string/format">
        <ListPreference
            android:defaultValue="filesize"
            android:entries="@array/format_ordering"
            android:entryValues="@array/format_ordering_values"
            android:icon="@drawable/baseline_sort_24"
            app:key="format_order"
            app:useSimpleSummaryProvider="true"
            app:title="@string/format_order" />

        <ListPreference
            android:defaultValue="ALL"
            android:entries="@array/format_filtering"
            android:entryValues="@array/format_filtering_values"
            android:icon="@drawable/baseline_filter_alt_24"
            app:key="format_filter"
            app:useSimpleSummaryProvider="true"
            app:title="@string/format_filter" />

        <SwitchPreferenceCompat
            android:widgetLayout="@layout/preferece_material_switch"
            app:defaultValue="true"
            android:icon="@drawable/ic_format"
            android:key="update_formats"
            app:summary="@string/update_formats_summary"
            app:title="@string/update_formats" />
    </PreferenceCategory>

    <PreferenceCategory android:title="@string/app">

        <SwitchPreferenceCompat
            android:widgetLayout="@layout/preferece_material_switch"
            app:defaultValue="true"
            android:icon="@drawable/ic_update_app"
            android:key="update_app"
            app:summary="@string/update_app_summary"
            app:title="@string/update_app" />

        <EditTextPreference
            app:isPreferenceVisible="false"
            app:key="skip_updates"
            app:defaultValue="" />

        <SwitchPreferenceCompat
            android:widgetLayout="@layout/preferece_material_switch"
            app:defaultValue="false"
            android:icon="@drawable/ic_experiment"
            android:key="update_beta"
            app:summary="@string/update_app_beta_summary"
            app:title="@string/update_app_beta" />

        <Preference
            app:icon="@drawable/ic_chapters"
            app:key="changelog"
            app:title="@string/changelog" />


        <Preference
            app:icon="@drawable/ic_info"
            app:key="version"
            app:title="@string/version"/>


    </PreferenceCategory>

</PreferenceScreen>