<UserControl x:Class="FLY.Thick.Base.UI.CustomSection.UcSectionError"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:FLY.Thick.Base.UI.CustomSection"
             xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
             mc:Ignorable="d" >
    <UserControl.Resources>
        <ResourceDictionary>

        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Border Style="{StaticResource Styles.ParamSection.Border}">
            <TextBlock Text="{StaticResource str.PgCustomSections.AlarmTip}" />
        </Border>
        <StackPanel Grid.Column="1">
            <GroupBox Style="{x:Null}" Margin="{StaticResource ControlMargin}">
                <GroupBox.Header>
                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="{StaticResource str.PgCustomSections.Music}" VerticalAlignment="Bottom"/>
                </GroupBox.Header>
                <StackPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Orientation="Horizontal">
                            <StackPanel Orientation="Vertical" Margin="{StaticResource ControlMargin}">
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgCustomSections.WarningDurationSec}" />
                                <StackPanel Orientation="Horizontal">
                                    <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding WarningDurationSec}" MaxWidth="120" HorizontalAlignment="Left"/>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="s"/>
                                </StackPanel>
                            </StackPanel>
                            <Button Style="{StaticResource Styles.Button.Icon.Rectangle}" Command="{Binding PlayCmd}" >
                                <iconPacks:PackIconMaterial Kind="Play" />
                            </Button>
                        </StackPanel>
                        <Grid Grid.Column="1">
                            <StackPanel Grid.Column="1" Margin="{StaticResource ControlMargin}">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="{StaticResource str.PgCustomSections.WarningTipPath}" VerticalAlignment="Bottom"/>
                                    <Button Style="{StaticResource Styles.Button.Icon}" Command="{Binding OpenCmd}" >
                                        <iconPacks:PackIconMaterial Kind="FolderOpen" />
                                    </Button>
                                </StackPanel>
                                <TextBlock Style="{StaticResource Styles.Text.FieldContent}" FontSize="{StaticResource FontSize.FieldContent.Small}" 
                                           TextWrapping="WrapWithOverflow"
                                           Text="{Binding WarningTipPath}" />

                            </StackPanel>
                        </Grid>
                    </Grid>



                </StackPanel>

            </GroupBox>
            <GroupBox Style="{x:Null}" Margin="{StaticResource ControlMargin}">
                <GroupBox.Header>
                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="{StaticResource str.PgCustomSections.ScanErrBigTip}" VerticalAlignment="Bottom"/>
                </GroupBox.Header>
                <StackPanel Orientation="Horizontal" x:Name="spErrCodes">
                    <StackPanel Margin="{StaticResource ControlMargin}">
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgCustomSections.Enable}" />
                            <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding EnableScanErrBigTip}" />
                        </StackPanel>
                    </StackPanel>
                </StackPanel>

            </GroupBox>
        </StackPanel>

    </Grid>
</UserControl>