<base:WpfUiWindow x:Class="Bloxstrap.UI.Elements.Bootstrapper.FluentDialog"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
        xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base"
        mc:Ignorable="d"
        Width="420"
        MinHeight="0"
        SizeToContent="Height"
        ResizeMode="NoResize"
        Background="{ui:ThemeResource ApplicationBackgroundBrush}"
        ExtendsContentIntoTitleBar="True"
        WindowBackdropType="Mica"
        WindowStartupLocation="CenterScreen"
        Closing="UiWindow_Closing">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
      
        <ui:TitleBar Grid.Row="0" x:Name="RootTitleBar" Padding="8" Title="{Binding Title, Mode=OneTime}" ShowMinimize="False" ShowMaximize="False" CanMaximize="False" ShowClose="False" />
      
        <Grid Grid.Row="1" Margin="16,8,16,16">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Border Grid.Column="0" Margin="0,12,0,0" Width="48" Height="48" VerticalAlignment="Top">
                <Border.Background>
                    <ImageBrush ImageSource="{Binding Icon, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" />
                </Border.Background>
            </Border>
            <StackPanel Grid.Column="1">
                <TextBlock Margin="16,8,0,0" FontSize="20" Text="{Binding Message, Mode=OneWay}" Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
                <ProgressBar Margin="16,16,0,16" IsIndeterminate="{Binding ProgressIndeterminate, Mode=OneWay}" Value="{Binding ProgressValue, Mode=OneWay}" />
            </StackPanel>
        </Grid>

        <Border Grid.Row="2" Padding="15">
            <Border.Background>
                <SolidColorBrush Color="{ui:ThemeResource SolidBackgroundFillColorSecondary}" Opacity="{Binding FooterOpacity, Mode=OneTime}" />
            </Border.Background>
            <Button Margin="0" Content="Cancel" Width="120" HorizontalAlignment="Right" IsEnabled="{Binding CancelEnabled, Mode=OneWay}" Command="{Binding CancelInstallCommand}" />
        </Border>
    </Grid>
</base:WpfUiWindow>
