<UserControl x:Class="HistoryView.Views.MessageBoxs.ThemeMessageBox"
             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:HistoryView.Views.MessageBoxs"
             mc:Ignorable="d">
    
    <Grid MinWidth="300" MaxWidth="500" MinHeight="220">
        <Grid.RowDefinitions>
            <RowDefinition Height="0"/>
            <RowDefinition/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="16"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="1" Margin="32">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Image Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{StaticResource Icon_Ask}" Visibility="{Binding Ask}" MaxHeight="64"/>
            <Image Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{StaticResource Hint}" Visibility="{Binding Info}" MaxHeight="52"/>
            <Image Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{StaticResource Icon_Warning}" Visibility="{Binding Warning}" MaxHeight="60"/>
            <Image Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{StaticResource Icon_Fatal}" Visibility="{Binding Error}" MaxHeight="68"/>
            <TextBlock Grid.Column="2" FontSize="16" VerticalAlignment="Center" FontFamily="Cascadia Code" Text="{Binding Message}" TextWrapping="Wrap" />
        </Grid>

        <Grid Grid.Row="2" Margin="16,0" Visibility="{Binding OK}">
            <Button Style="{StaticResource FunctionButton}" Width="100" Height="32" Command="{Binding ExitCommand}" CommandParameter="OK">OK</Button>
        </Grid>

        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="16,0" Visibility="{Binding OKCancel}">
            <Button Style="{StaticResource FunctionButton}" Width="100" Height="32" Margin="16,0" Command="{Binding ExitCommand}" CommandParameter="OK">OK</Button>
            <Button Style="{StaticResource FunctionButton}" Width="100" Height="32" Margin="16,0" Background="Gray" Command="{Binding ExitCommand}" CommandParameter="Cancel">Cancel</Button>
        </StackPanel>

        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="16,0"  Visibility="{Binding YesNoCancel}">
            <Button Style="{StaticResource FunctionButton}" Width="100" Height="32" Margin="16,0" Command="{Binding ExitCommand}" CommandParameter="Yes">Yes</Button>
            <Button Style="{StaticResource FunctionButton}" Width="100" Height="32" Margin="16,0" Background="Gray" Command="{Binding ExitCommand}" CommandParameter="No">No</Button>
            <Button Style="{StaticResource FunctionButton}" Width="100" Height="32" Margin="16,0" Background="Gray" Command="{Binding ExitCommand}" CommandParameter="Cancel">Cancel</Button>
        </StackPanel>

        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="16,0" Visibility="{Binding YesNo}">
            <Button Style="{StaticResource FunctionButton}" Width="100" Height="32" Margin="16,0" Command="{Binding ExitCommand}" CommandParameter="Yes">Yes</Button>
            <Button Style="{StaticResource FunctionButton}" Width="100" Height="32" Margin="16,0" Background="Gray" Command="{Binding ExitCommand}" CommandParameter="No">No</Button>
        </StackPanel>
    </Grid>
</UserControl>
