<Window x:Class="PSLauncher.App.Views.UpdateAvailableDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:loc="clr-namespace:PSLauncher.Core.Localization;assembly=PSLauncher.Core"
        Title="{x:Static loc:Strings.UpdateAvailableTitle}"
        Icon="pack://application:,,,/Resources/favicon.ico"
        Width="640" Height="540"
        MinWidth="480" MinHeight="400"
        WindowStartupLocation="CenterOwner"
        Background="{StaticResource Brush.Bg.Window}">
    <Grid Margin="24">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0"
                   Text="{Binding Title}"
                   FontSize="22" FontWeight="SemiBold"
                   Foreground="{StaticResource Brush.Text.Primary}" />

        <TextBlock Grid.Row="1"
                   Text="{Binding Subtitle}"
                   Foreground="{StaticResource Brush.Text.Secondary}"
                   Margin="0,4,0,18" />

        <Border Grid.Row="2"
                Background="{StaticResource Brush.Bg.Card}"
                BorderBrush="{StaticResource Brush.Border}" BorderThickness="1"
                CornerRadius="6"
                Padding="16">
            <FlowDocumentScrollViewer
                Document="{Binding ReleaseNotesDocument}"
                Foreground="{StaticResource Brush.Text.Primary}"
                Background="Transparent" />
        </Border>

        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,18,0,0">
            <Button Style="{StaticResource SecondaryButton}"
                    Content="{x:Static loc:Strings.ActionLater}"
                    IsCancel="True"
                    Margin="0,0,12,0"
                    Click="OnLater" />
            <Button Style="{StaticResource PrimaryButton}"
                    Content="{x:Static loc:Strings.UpdateDownload}"
                    Padding="32,10"
                    Click="OnDownload" />
        </StackPanel>
    </Grid>
</Window>
