<UserControl
    x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsLoggingView"
    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:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
    xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
    xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
    mc:Ignorable="d"
    x:DataType="viewModels:SettingsViewModel">
    <Design.DataContext>
        <viewModels:SettingsViewModel />
    </Design.DataContext>
    <ScrollViewer
        Name="LoggingPage"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch"
        HorizontalScrollBarVisibility="Disabled"
        VerticalScrollBarVisibility="Auto">
        <Border Classes="settings">
            <StackPanel
                Margin="10"
                HorizontalAlignment="Stretch"
                Orientation="Vertical"
                Spacing="10">
                <TextBlock Classes="h1" Text="{ext:Locale SettingsTabLoggingLogging}" />
                <StackPanel Margin="10,0,0,0" Orientation="Vertical">
                    <CheckBox IsChecked="{Binding EnableFileLog}"
                              ToolTip.Tip="{ext:Locale FileLogTooltip}">
                        <TextBlock Text="{ext:Locale SettingsTabLoggingEnableLoggingToFile}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding EnableStub}"
                              ToolTip.Tip="{ext:Locale StubLogTooltip}">
                        <TextBlock Text="{ext:Locale SettingsTabLoggingEnableStubLogs}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding EnableInfo}"
                              ToolTip.Tip="{ext:Locale InfoLogTooltip}">
                        <TextBlock Text="{ext:Locale SettingsTabLoggingEnableInfoLogs}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding EnableWarn}"
                              ToolTip.Tip="{ext:Locale WarnLogTooltip}">
                        <TextBlock Text="{ext:Locale SettingsTabLoggingEnableWarningLogs}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding EnableError}"
                              ToolTip.Tip="{ext:Locale ErrorLogTooltip}">
                        <TextBlock Text="{ext:Locale SettingsTabLoggingEnableErrorLogs}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding EnableGuest}"
                              ToolTip.Tip="{ext:Locale GuestLogTooltip}">
                        <TextBlock Text="{ext:Locale SettingsTabLoggingEnableGuestLogs}" />
                    </CheckBox>
                </StackPanel>
                <Separator Height="1" />
                <StackPanel Orientation="Vertical" Spacing="5">
                    <TextBlock Classes="h1" Text="{ext:Locale SettingsTabLoggingDeveloperOptions}" />
                    <TextBlock Foreground="{DynamicResource SecondaryTextColor}" Text="{ext:Locale SettingsTabLoggingDeveloperOptionsNote}" />
                </StackPanel>
                <StackPanel
                    Margin="10,0,0,0"
                    HorizontalAlignment="Stretch"
                    Orientation="Vertical"
                    Spacing="10">
                    <StackPanel Orientation="Vertical">
                        <CheckBox IsChecked="{Binding EnableTrace}"
                                  ToolTip.Tip="{ext:Locale TraceLogTooltip}">
                            <TextBlock Text="{ext:Locale SettingsTabLoggingEnableTraceLogs}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding EnableFsAccessLog}"
                                ToolTip.Tip="{ext:Locale FileAccessLogTooltip}">
                        <TextBlock Text="{ext:Locale SettingsTabLoggingEnableFsAccessLogs}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding EnableDebug}"
                                  ToolTip.Tip="{ext:Locale DebugLogTooltip}">
                            <TextBlock Text="{ext:Locale SettingsTabLoggingEnableDebugLogs}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding EnableAvaloniaLog}"
                                  ToolTip.Tip="{ext:Locale AvaloniaLogTooltip}">
                            <TextBlock Text="{ext:Locale SettingsTabLoggingEnableAvaloniaLogs}" />
                        </CheckBox>
                        <StackPanel Margin="0,10,0,0" Orientation="Horizontal" VerticalAlignment="Stretch">
                            <TextBlock VerticalAlignment="Center"
                                    ToolTip.Tip="{ext:Locale FSAccessLogModeTooltip}"
                                    Text="{ext:Locale SettingsTabLoggingFsGlobalAccessLogMode}"
                                    Width="285" />
                            <ui:NumberBox
                                Maximum="3"
                                Minimum="0"
                                Width="150"
                                SpinButtonPlacementMode="Inline"
                                SmallChange="1"
                                LargeChange="1"
                                Value="{Binding FsGlobalAccessLogMode}" />
                        </StackPanel>
                        <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
                            <TextBlock VerticalAlignment="Center"
                                    Text="{ext:Locale SettingsTabLoggingGraphicsBackendLogLevel}"
                                    ToolTip.Tip="{ext:Locale OpenGlLogLevel}"
                                    Width="285" />
                            <ComboBox SelectedIndex="{Binding OpenglDebugLevel}"
                                    Width="150"
                                    HorizontalContentAlignment="Left"
                                    ToolTip.Tip="{ext:Locale OpenGlLogLevel}">
                                <ComboBoxItem>
                                    <TextBlock Text="{ext:Locale SettingsTabLoggingGraphicsBackendLogLevelNone}" />
                                </ComboBoxItem>
                                <ComboBoxItem>
                                    <TextBlock Text="{ext:Locale SettingsTabLoggingGraphicsBackendLogLevelError}" />
                                </ComboBoxItem>
                                <ComboBoxItem>
                                    <TextBlock
                                        Text="{ext:Locale SettingsTabLoggingGraphicsBackendLogLevelPerformance}" />
                                </ComboBoxItem>
                                <ComboBoxItem>
                                    <TextBlock Text="{ext:Locale SettingsTabLoggingGraphicsBackendLogLevelAll}" />
                                </ComboBoxItem>
                            </ComboBox>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </Border>
    </ScrollViewer>
</UserControl>
