<UserControl xmlns="https://github.com/avaloniaui"
             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"
             xmlns:controls="clr-namespace:GalaxyBudsClient.Interface.Controls"
             xmlns:pages="clr-namespace:GalaxyBudsClient.Interface.ViewModels.Pages"
             xmlns:ext="clr-namespace:GalaxyBudsClient.Interface.MarkupExtensions"
             xmlns:i18N="clr-namespace:GalaxyBudsClient.Generated.I18N"
             mc:Ignorable="d" d:DesignWidth="800"
             x:Class="GalaxyBudsClient.Interface.Pages.HiddenModePage"
             x:DataType="pages:HiddenModePageViewModel"
             x:CompileBindings="True">

    <Design.DataContext>
        <pages:SystemPageViewModel />
    </Design.DataContext>

    <ScrollViewer>
        <StackPanel Spacing="8" Margin="{StaticResource AppPageMargin}">

            <controls:CustomInfoBar Title="{ext:Translate {x:Static i18N:Keys.HiddenModeWarning}}"
                                    Message="{ext:Translate {x:Static i18N:Keys.HiddenModeWarningDesc}}"
                                    IsClosable="False"
                                    IsOpen="True"
                                    Severity="Warning" />
            
            <Border BorderBrush="{DynamicResource ControlStrongStrokeColorDefaultBrush}"
                    BorderThickness="1"
                    CornerRadius="4">
                <controls:SettingsGroup>
                    <Interaction.Behaviors>
                        <ext:RequiresConnectedDeviceBehavior />
                    </Interaction.Behaviors>
                
                    <controls:SettingsSymbolItem Content="{Binding TargetHeader}"
                                                 Description="{Binding TargetDescription}"
                                                 Symbol="TargetArrow" />
                </controls:SettingsGroup>
            </Border>
            

            
            <controls:SettingsGroup>
                <Interaction.Behaviors>
                    <ext:RequiresConnectedDeviceBehavior />
                </Interaction.Behaviors>
                
                <controls:SettingsSwitchItem Content="{ext:Translate {x:Static i18N:Keys.HiddenModeUart}}"
                                             Description="{ext:Translate {x:Static i18N:Keys.HiddenModeUartDesc}}"
                                             IsChecked="{Binding IsUartEnabled}"
                                             Symbol="SerialPort"
                                             IsClickEnabled="True" />
                                
                <controls:SettingsSymbolItem Content="{ext:Translate {x:Static i18N:Keys.HiddenModePower}}"
                                             Description="{ext:Translate {x:Static i18N:Keys.HiddenModePowerDesc}}"
                                             Symbol="Power"
                                             ActionSymbol="ChevronRight"
                                             IsClickEnabled="True"
                                             Click="OnPowerMenuClicked"/>
            </controls:SettingsGroup>         
            
            <controls:SettingsGroup>
                <Interaction.Behaviors>
                    <ext:RequiresConnectedDeviceBehavior />
                </Interaction.Behaviors>
 
                <controls:SettingsSymbolItem Content="{ext:Translate {x:Static i18N:Keys.HiddenModeSerialChange}}"
                                             Description="{ext:Translate {x:Static i18N:Keys.HiddenModeSerialChangeDesc}}"
                                             Symbol="ContactCardRibbon"
                                             IsClickEnabled="True"
                                             Click="OnChangeSerialClicked"/>
                
                <controls:SettingsSymbolItem Content="{ext:Translate {x:Static i18N:Keys.HiddenModeDidChange}}"
                                             Description="{ext:Translate {x:Static i18N:Keys.HiddenModeDidChangeDesc}}"
                                             Symbol="NumberSymbol"
                                             IsClickEnabled="True"
                                             Click="OnChangeDidClicked"/>

                <controls:SettingsSymbolItem Content="{ext:Translate {x:Static i18N:Keys.HiddenModeSkuChange}}"
                                             Description="{ext:Translate {x:Static i18N:Keys.HiddenModeSkuChangeDesc}}"
                                             Symbol="Cart"
                                             IsClickEnabled="True"
                                             Click="OnChangeSkuClicked"/>

                <controls:SettingsSymbolItem Content="{ext:Translate {x:Static i18N:Keys.HiddenModeBtPeerAddrChange}}"
                                             Description="{ext:Translate {x:Static i18N:Keys.HiddenModeBtPeerChangeDesc}}"
                                             Symbol="BluetoothSearching"
                                             IsClickEnabled="True"
                                             Click="OnChangePeerAddressClicked"/>

                <controls:SettingsSymbolItem Content="{ext:Translate {x:Static i18N:Keys.HiddenModeBtLocalAddrChange}}"
                                             Description="{ext:Translate {x:Static i18N:Keys.HiddenModeBtLocalChangeDesc}}"
                                             Symbol="Bluetooth"
                                             IsClickEnabled="True" 
                                             Click="OnChangeLocalAddressClicked"/>

            </controls:SettingsGroup>
            
            <controls:SettingsGroup>
                <Interaction.Behaviors>
                    <ext:RequiresConnectedDeviceBehavior />
                </Interaction.Behaviors>
                                
                <controls:SettingsSymbolItem Content="{ext:Translate {x:Static i18N:Keys.HiddenModeTerminal}}"
                                             Description="{ext:Translate {x:Static i18N:Keys.HiddenModeTerminalDesc}}"
                                             Symbol="WindowConsole"
                                             IsClickEnabled="True"
                                             ActionSymbol="ChevronRight"
                                             Click="OnHiddenTerminalClicked" />
            </controls:SettingsGroup>
        </StackPanel>
    </ScrollViewer>
</UserControl>