<UserControl
    x:Class="AmbientSounds.Controls.SettingsControl"
    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:local="using:AmbientSounds.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:strings="using:AmbientSounds.Strings"
    d:DesignHeight="300"
    d:DesignWidth="400"
    mc:Ignorable="d">

    <UserControl.Resources>
        <Style TargetType="RadioButton">
            <Setter Property="HorizontalAlignment" Value="Stretch" />
        </Style>

        <Style x:Key="SettingTitleStyle" TargetType="TextBlock">
            <Setter Property="Margin" Value="0,12,0,0" />
        </Style>
    </UserControl.Resources>

    <ScrollViewer>
        <StackPanel>
            <local:AboutControl />

            <!--  Telemetry  -->
            <ToggleSwitch
                x:Uid="SettingsTelemetrySwitch"
                Margin="0,12,0,0"
                IsOn="{x:Bind ViewModel.TelemetryEnabled, Mode=TwoWay}">
                <ToggleSwitch.OffContent>
                    <TextBlock x:Uid="OffTextBlock" />
                </ToggleSwitch.OffContent>
                <ToggleSwitch.OnContent>
                    <TextBlock x:Uid="OnTextBlock" />
                </ToggleSwitch.OnContent>
            </ToggleSwitch>

            <!--  New sound notifications  -->
            <ToggleSwitch
                x:Uid="SettingsNotificationsSwitch"
                Margin="0,12,0,0"
                IsOn="{x:Bind ViewModel.NotificationsEnabled, Mode=TwoWay}">
                <ToggleSwitch.OffContent>
                    <TextBlock x:Uid="OffTextBlock" />
                </ToggleSwitch.OffContent>
                <ToggleSwitch.OnContent>
                    <TextBlock x:Uid="OnTextBlock" />
                </ToggleSwitch.OnContent>
            </ToggleSwitch>

            <!--  screensaver  -->
            <ToggleSwitch
                x:Uid="SettingsScreensaverSwitch"
                Margin="0,12,0,0"
                IsOn="{x:Bind ViewModel.ScreensaverEnabled, Mode=TwoWay}">
                <ToggleSwitch.OffContent>
                    <TextBlock x:Uid="OffTextBlock" />
                </ToggleSwitch.OffContent>
                <ToggleSwitch.OnContent>
                    <TextBlock Text="{x:Bind strings:Resources.ScreensaverOn}" />
                </ToggleSwitch.OnContent>
            </ToggleSwitch>

            <CheckBox
                x:Uid="SettingsScreensaverDark"
                Margin="0,12,0,0"
                IsChecked="{x:Bind ViewModel.DarkScreensaverEnabled, Mode=TwoWay}" />

        </StackPanel>
    </ScrollViewer>
</UserControl>
