<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="VisionBuilder.UI.Avalonia.Uno.Views.ImagePreviewDialog"
        Title="Image Preview"
        WindowState="Maximized"
        WindowStartupLocation="CenterOwner"
        Background="White"
        CanResize="True">

    <Grid RowDefinitions="Auto,Auto,*" Margin="16">
        <!-- Row 0: Error name label -->
        <TextBlock x:Name="LblImageName"
                   Grid.Row="0"
                   HorizontalAlignment="Center"
                   FontSize="16"
                   Margin="0,8,0,0" />

        <!-- Row 1: Toolbar buttons -->
        <Grid Grid.Row="1" Margin="0,8,0,8">
            <!-- Left-aligned buttons -->
            <StackPanel Orientation="Horizontal"
                        HorizontalAlignment="Left"
                        Spacing="8">
                <Button x:Name="BtnPrev"
                        Content="PREVIOUS IMAGE"
                        Width="168" Height="64"
                        FontSize="14" FontWeight="Bold"
                        HorizontalContentAlignment="Center"
                        VerticalContentAlignment="Center"
                        BorderBrush="#D32F2F"
                        BorderThickness="2"
                        Background="White"
                        Foreground="#D32F2F" />
                <Button x:Name="BtnSwitchView"
                        Content="SHOW ORIGINAL"
                        Width="168" Height="64"
                        FontSize="14" FontWeight="Bold"
                        HorizontalContentAlignment="Center"
                        VerticalContentAlignment="Center"
                        BorderBrush="#D32F2F"
                        BorderThickness="2"
                        Background="White"
                        Foreground="#D32F2F" />
            </StackPanel>

            <!-- Right-aligned buttons -->
            <StackPanel Orientation="Horizontal"
                        HorizontalAlignment="Right"
                        Spacing="8">
                <Button x:Name="BtnLearn"
                        Content="LEARN THIS"
                        Width="168" Height="64"
                        IsVisible="False"
                        FontSize="14" FontWeight="Bold"
                        HorizontalContentAlignment="Center"
                        VerticalContentAlignment="Center"
                        BorderBrush="#D32F2F"
                        BorderThickness="2"
                        Background="White"
                        Foreground="#D32F2F" />
                <Button x:Name="BtnNext"
                        Content="NEXT IMAGE"
                        Width="168" Height="64"
                        FontSize="14" FontWeight="Bold"
                        HorizontalContentAlignment="Center"
                        VerticalContentAlignment="Center"
                        BorderBrush="#D32F2F"
                        BorderThickness="2"
                        Background="White"
                        Foreground="#D32F2F" />
                <Button x:Name="BtnClose"
                        Content="CLOSE"
                        Width="168" Height="64"
                        FontSize="14" FontWeight="Bold"
                        HorizontalContentAlignment="Center"
                        VerticalContentAlignment="Center"
                        Background="#D32F2F"
                        Foreground="White" />
            </StackPanel>
        </Grid>

        <!-- Row 2: Image -->
        <Image x:Name="PreviewImage"
               Grid.Row="2"
               Stretch="Uniform" />
    </Grid>
</Window>
