<Page
    x:Class="FoxTube.Pages.SettingsPages.General"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <StackPanel Orientation="Vertical">
        <TextBlock x:Uid="/General/preferences" Text="Preferences" FontSize="28"/>
        <TextBlock x:Uid="/General/regNsearch" Text="Region &#x26; search" FontSize="22" Margin="0,10,0,0"/>
        <ComboBox x:Uid="/General/interfaceLang" Header="App interface language" MinWidth="250" Name="language" SelectionChanged="language_SelectionChanged">
            <ComboBoxItem x:Uid="/General/en" Content="English (United States)" Tag="en-US"/>
            <ComboBoxItem x:Uid="/General/ru" Content="Russian (Russia)" Tag="ru-RU"/>
        </ComboBox>
        <StackPanel Name="restartNote" Visibility="Collapsed">
            <TextBlock x:Uid="/General/restart" Foreground="Red" Text="Reopen the app to apply settings"/>
            <Button x:Uid="/General/closeApp" Content="Close app" Background="Red" Margin="5" Click="Button_Click"/>
        </StackPanel>
        <ComboBox x:Uid="/General/relevanceLanguage" Header="Search relevance language" MinWidth="250" Name="relLanguage" SelectionChanged="RelLanguage_SelectionChanged"/>
        <ComboBox x:Uid="/General/region" Header="Region" MinWidth="250" Name="region" SelectionChanged="region_SelectionChanged"/>
        <ComboBox x:Uid="/General/safeSearch" Header="SafeSearch" MinWidth="250" Name="safeSearch" SelectionChanged="safeSearch_SelectionChanged">
            <ComboBoxItem x:Uid="/General/moderate" Content="Moderate"/>
            <ComboBoxItem x:Uid="/General/none" Content="None"/>
            <ComboBoxItem x:Uid="/General/strict" Content="Strict"/>
        </ComboBox>

        <TextBlock x:Uid="/General/interface" Text="Interface" FontSize="22" Margin="0,10,0,0"/>
        <ToggleSwitch x:Uid="/General/minimizedCommandBar" Name="minimizedCB" OnContent="Use compact command bar" OffContent="Use minimized command bar" Toggled="MinimizedCB_Toggled"/>
        <ToggleSwitch x:Uid="/General/clipboardProcessing" x:Name="clipboardProcessing" OnContent="Process youtube links from your clipboard" OffContent="Process youtube links from your clipboard" Toggled="ClipboardProcessing_Toggled"/>

        <TextBlock x:Uid="/General/playback" Text="Playback" FontSize="22" Margin="0,10,0,0"/>
        <ComboBox x:Uid="/General/quality" Width="250" Header="Default video playback quality" Name="quality" SelectionChanged="quality_SelectionChanged">
            <ComboBoxItem Tag="remember" x:Uid="/General/remember" Content="Remember my choice"/>
            <ComboBoxItem Tag="auto" x:Uid="/General/auto" Content="Auto"/>
        </ComboBox>
        <ToggleSwitch x:Uid="/General/metered" OnContent="Notify when playing on metered connection" OffContent="Notify when playing on metered connection" Name="mobileWarning" Toggled="mobileWarning_Toggled"/>
        <ToggleSwitch x:Uid="/General/autoplay" OnContent="Play videos automatically" OffContent="Play videos automatically" Name="autoplay" Toggled="autoplay_Toggled"/>

        <TextBlock x:Uid="/General/notifications" Text="Notifications" FontSize="22" Margin="0,10,0,0"/>
        <ToggleSwitch x:Uid="/General/newVideo" Name="newVideo" OnContent="Notify when someone of your subscriptions uploaded new video" OffContent="Notify when someone of your subscriptions uploaded new video" Toggled="notification_IsEnabledChanged"/>
        <ToggleSwitch x:Uid="/General/devNotifications" Name="devNews" OnContent="Recieve messages from developers" OffContent="Recieve messages from developers" Toggled="devNews_Toggled"/>

        <TextBlock x:Uid="/General/color" Text="Color mode" FontSize="22" Margin="0,10,0,0"/>
        <RadioButton x:Uid="/General/colorLight" Content="Light" Name="light" GroupName="color" Checked="RadioButton_Checked"/>
        <RadioButton x:Uid="/General/colorDark" Content="Dark" Name="dark" GroupName="color" Checked="RadioButton_Checked"/>
        <RadioButton x:Uid="/General/colorDefault" Content="Windows default" Name="system" GroupName="color" Checked="RadioButton_Checked"/>
        <HyperlinkButton x:Uid="/General/colorSystem" Content="Windows color settings" NavigateUri="ms-settings:colors"/>
    </StackPanel>
</Page>
