<UserControl x:Class="UniGetUI.Avalonia.Views.Pages.SettingsPages.Interface_P"
             xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:automation="clr-namespace:Avalonia.Automation;assembly=Avalonia.Controls"
             xmlns:vm="using:UniGetUI.Avalonia.ViewModels.Pages.SettingsPages"
             xmlns:settings="using:UniGetUI.Avalonia.Views.Controls.Settings"
             xmlns:t="using:UniGetUI.Avalonia.MarkupExtensions"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:DataType="vm:Interface_PViewModel">

    <ScrollViewer HorizontalScrollBarVisibility="Disabled">
        <StackPanel Orientation="Vertical">

            <settings:TranslatedTextBlock Text="Appearance"
                                          FontSize="14"
                                          FontWeight="SemiBold"
                                          Margin="44,32,4,8"
                                          automation:AutomationProperties.HeadingLevel="2"/>

            <settings:ComboboxCard x:Name="ThemeSelector"
                                   CornerRadius="8,8,0,0"/>

             <settings:ComboboxCard x:Name="StartupPageSelector"
                                    CornerRadius="0"
                                    BorderThickness="1,0,1,1"/>

            <settings:ComboboxCard x:Name="NavMenuModeSelector"
                                   CornerRadius="0,0,8,8"
                                   BorderThickness="1,0,1,1"/>

            <Border Height="16"/>

            <settings:TranslatedTextBlock Text="Rendering"
                                         FontSize="14"
                                         FontWeight="SemiBold"
                                         Margin="44,32,4,8"
                                         automation:AutomationProperties.HeadingLevel="2"
                                         IsVisible="{Binding IsWindows}"/>

            <settings:CheckboxCard x:Name="InterfaceRenderingCard"
                                   SettingName="DisableAutoSoftwareRenderingOnGpuLessHosts"
                                   Text="{t:Translate Automatically switch to software rendering when Windows has no hardware GPU}"
                                   WarningText="{t:Translate Restart UniGetUI to apply this change}"
                                   StateChangedCommand="{Binding ShowRestartRequiredCommand}"
                                   CornerRadius="8"
                                   IsVisible="{Binding IsWindows}"/>

            <Border Height="16"/>

             <StackPanel x:Name="SystemTraySection" Orientation="Vertical">
                <settings:TranslatedTextBlock Text="UniGetUI on the background and system tray"
                                              FontSize="14"
                                              FontWeight="SemiBold"
                                              Margin="44,32,4,8"
                                          automation:AutomationProperties.HeadingLevel="2"/>

                <settings:CheckboxCard x:Name="DisableSystemTrayCard"
                                       SettingName="DisableSystemTray"
                                       Text="{t:Translate Close UniGetUI to the system tray}"
                                       StateChangedCommand="{Binding RefreshSystemTrayCommand}"
                                       CornerRadius="8,8,0,0"/>

                <settings:ButtonCard x:Name="EditAutostartSettings"
                                     CornerRadius="0,0,8,8"
                                     BorderThickness="1,0,1,1"
                                     IsVisible="{Binding IsWindows}"
                                     Text="{t:Translate Manage UniGetUI autostart behaviour}"
                                     ButtonText="{t:Translate Open}"
                                     Command="{Binding EditAutostartSettingsCommand}"/>
            </StackPanel>

            <settings:TranslatedTextBlock Text="Package lists"
                                          FontSize="14"
                                          FontWeight="SemiBold"
                                          Margin="44,32,4,8"
                                          automation:AutomationProperties.HeadingLevel="2"/>

            <settings:CheckboxCard x:Name="InterfacePackageListsCard"
                                   SettingName="DisableIconsOnPackageLists"
                                   Text="{t:Translate Show package icons on package lists}"
                                   StateChangedCommand="{Binding ShowRestartRequiredCommand}"
                                   CornerRadius="8,8,0,0"/>

            <settings:CheckboxCard x:Name="PackageIllustrationsCard"
                                   SettingName="DisablePackageIllustrations"
                                   Text="{t:Translate Show illustrations on package lists}"
                                   WarningText="{t:Translate Restart UniGetUI to apply this change}"
                                   StateChangedCommand="{Binding ShowRestartRequiredCommand}"
                                   CornerRadius="0"
                                   BorderThickness="1,0,1,1"/>

            <settings:ButtonCard x:Name="ResetIconCache"
                                 CornerRadius="0,0,8,8"
                                 BorderThickness="1,0,1,1"
                                 Header="{Binding IconCacheSizeText}"
                                 ButtonText="{t:Translate Clear cache}"
                                 Command="{Binding ResetIconCacheCommand}"
                                 CommandParameter="{Binding $self}"/>

            <Border Height="16"/>

            <settings:CheckboxCard x:Name="SelectUpgradableCard"
                                   SettingName="DisableSelectingUpdatesByDefault"
                                   Text="{t:Translate Select upgradable packages by default}"
                                   StateChangedCommand="{Binding ShowRestartRequiredCommand}"
                                   CornerRadius="8"/>

        </StackPanel>
    </ScrollViewer>

</UserControl>
