<local:SettingSectionControl
    x:Class="Bili.App.Controls.StartupSettingSection"
    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:icons="using:Richasy.FluentIcon.Uwp"
    xmlns:labs="using:CommunityToolkit.Labs.WinUI"
    xmlns:loc="using:Bili.App.Resources.Extension"
    xmlns:local="using:Bili.App.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="300"
    d:DesignWidth="400"
    mc:Ignorable="d">

    <labs:SettingsExpander Description="{loc:Locale Name=StartMethodDescription}" Header="{loc:Locale Name=StartMethod}">
        <labs:SettingsExpander.HeaderIcon>
            <icons:RegularFluentIcon Symbol="AirplaneTakeOff16" />
        </labs:SettingsExpander.HeaderIcon>
        <labs:SettingsExpander.Items>
            <labs:SettingsCard Description="{loc:Locale Name=PrelaunchDescription}" Header="{loc:Locale Name=Prelaunch}">
                <ToggleSwitch IsOn="{x:Bind ViewModel.IsPrelaunch, Mode=TwoWay}" />
            </labs:SettingsCard>
            <labs:SettingsCard Description="{loc:Locale Name=StartupDescription}" Header="{loc:Locale Name=Startup}">
                <ToggleSwitch IsOn="{x:Bind ViewModel.IsStartup, Mode=TwoWay}" />
            </labs:SettingsCard>
            <labs:SettingsCard
                ContentAlignment="Vertical"
                Foreground="{ThemeResource SystemFillColorCriticalBrush}"
                Header="{x:Bind ViewModel.StartupWarningText, Mode=OneWay}"
                Visibility="{x:Bind ViewModel.StartupWarningText, Mode=OneWay, Converter={StaticResource ObjectToVisibilityConverter}}">
                <labs:SettingsCard.HeaderIcon>
                    <icons:RegularFluentIcon Symbol="Warning16" />
                </labs:SettingsCard.HeaderIcon>
            </labs:SettingsCard>
        </labs:SettingsExpander.Items>
    </labs:SettingsExpander>
</local:SettingSectionControl>
