<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ SkyTube
  ~ Copyright (C) 2017-2018  Ramon Mifsud
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation (version 3 of the License).
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

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

	<CheckBoxPreference
		app:key="@string/pref_key_enable_video_blocker"
		app:title="@string/pref_title_enable_video_blocker"
		app:summary="@string/pref_summary_enable_video_blocker"
		app:defaultValue="true"
		app:iconSpaceReserved="false" />

	<PreferenceCategory
		app:key="channel_filters"
		app:title="@string/pref_channels_filter_category"
		app:iconSpaceReserved="false">

		<ListPreference
			app:key="@string/pref_key_channel_filter_method"
			app:title="@string/pref_title_channel_filter_method"
			app:summary="@string/pref_summary_channel_filter_method"
			app:entries="@array/channel_filtering_list"
			app:entryValues="@array/channel_filtering_values_list"
			app:defaultValue="@string/channel_blacklisting_filtering"
			app:iconSpaceReserved="false"
			app:dependency="@string/pref_key_enable_video_blocker" />

	    <Preference
	        app:key="@string/pref_key_channel_blacklist"
	        app:title="@string/pref_title_channel_blacklist"
	        app:summary="@string/pref_summary_channel_blacklist"
			app:iconSpaceReserved="false"
			app:dependency="@string/pref_key_enable_video_blocker" />

		<Preference
			app:key="@string/pref_key_channel_whitelist"
			app:title="@string/pref_title_channel_whitelist"
			app:summary="@string/pref_summary_channel_whitelist"
			app:iconSpaceReserved="false"
			app:dependency="@string/pref_key_enable_video_blocker" />

	</PreferenceCategory>

    <PreferenceCategory
		app:key="languages_filter"
	    app:title="@string/pref_languages_filter_category"
		app:iconSpaceReserved="false">

        <ListPreference
            app:key="@string/pref_key_preferred_region"
            app:title="@string/pref_title_preferred_regions"
            app:summary="@string/pref_summary_preferred_regions"
            app:entries="@array/country_names"
            app:entryValues="@array/country_codes"
            app:defaultValue=""
			app:iconSpaceReserved="false" />

        <Preference
            app:key="@string/pref_key_preferred_languages"
            app:title="@string/pref_title_preferred_languages"
            app:summary="@string/pref_summary_preferred_languages"
			app:iconSpaceReserved="false"
			app:dependency="@string/pref_key_enable_video_blocker" />

        <CheckBoxPreference
	        app:key="@string/pref_key_lang_detection_video_filtering"
	        app:title="@string/pref_title_lang_detection_video_filtering"
	        app:summary="@string/pref_summary_lang_detection_video_filtering"
	        app:defaultValue="false"
			app:iconSpaceReserved="false"
			app:dependency="@string/pref_key_enable_video_blocker" />

    </PreferenceCategory>

	<PreferenceCategory
		app:key="other_filters"
		app:title="@string/pref_other_filters_category"
		app:iconSpaceReserved="false">

		<ListPreference
			app:key="@string/pref_key_low_views_filter"
			app:title="@string/pref_title_low_views_filter"
			app:summary="@string/pref_summary_low_views_filter"
			app:entries="@array/views_filtering_list"
			app:entryValues="@array/views_filtering_values_list"
			app:defaultValue="@string/views_filtering_disabled"
			app:iconSpaceReserved="false"
			app:dependency="@string/pref_key_enable_video_blocker" />

		<ListPreference
			app:key="@string/pref_key_dislikes_filter"
			app:title="@string/pref_title_dislikes_filter"
			app:summary="@string/pref_summary_dislikes_filter"
			app:entries="@array/dislikes_filtering_list"
			app:entryValues="@array/dislikes_filtering_values_list"
			app:defaultValue="@string/dislikes_filtering_disabled"
			app:iconSpaceReserved="false"
			app:dependency="@string/pref_key_enable_video_blocker" />

	</PreferenceCategory>

</PreferenceScreen>