<dialogs:ImmersiveDialog xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dialogs="using:UniGetUI.Avalonia.Views.DialogPages"
        xmlns:t="using:UniGetUI.Avalonia.MarkupExtensions"
        x:Class="UniGetUI.Avalonia.Views.DialogPages.CrashReportWindow"
        Title="{t:Translate UniGetUI – Crash Report}"
        MaxWidth="800"
        MinWidth="500"
        MaxHeight="580"
        MinHeight="380"
        Background="{DynamicResource AppDialogBackground}">

    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel Margin="24,20,24,24" Spacing="16">

            <!-- Title + description -->
            <StackPanel Spacing="4">
                <TextBlock Text="{t:Translate UniGetUI has crashed}"
                           FontSize="28"
                           FontWeight="SemiBold"/>
                <TextBlock Text="{t:Translate Text='Help us fix this by sending a crash report to Devolutions. All fields below are optional.'}"
                           Opacity="0.7"
                           TextWrapping="Wrap"/>
            </StackPanel>

            <!-- Email field -->
            <StackPanel Spacing="4">
                <TextBlock Text="{t:Translate Text='Email (optional)'}" FontSize="12" Opacity="0.7"/>
                <TextBox x:Name="EmailBox"
                         PlaceholderText="{t:Translate Text='your@email.com'}"/>
            </StackPanel>

            <!-- Additional details field -->
            <StackPanel Spacing="4">
                <TextBlock Text="{t:Translate Text='Additional details (optional)'}" FontSize="12" Opacity="0.7"/>
                <TextBox x:Name="DetailsBox"
                         AcceptsReturn="True"
                         Height="90"
                         PlaceholderText="{t:Translate Text='Describe what you were doing when the crash occurred…'}"
                         TextWrapping="Wrap"/>
            </StackPanel>

            <!-- Crash report (read-only) -->
            <StackPanel Spacing="4">
                <TextBlock Text="{t:Translate Text='Crash report'}" FontSize="12" Opacity="0.7"/>
                <TextBox x:Name="CrashReportText"
                         AcceptsReturn="True"
                         FontFamily="Cascadia Code,Cascadia Mono,Consolas,Menlo,monospace"
                         FontSize="11"
                         Height="160"
                         IsReadOnly="True"
                         TextWrapping="NoWrap"/>
            </StackPanel>

            <!-- Action buttons (content set in code-behind for translation) -->
            <StackPanel HorizontalAlignment="Right"
                        Orientation="Horizontal"
                        Spacing="8">
                <Button x:Name="DontSendButton"
                        Click="DontSend_Click"/>
                <Button x:Name="SendButton"
                        Classes="accent"
                        Click="SendReport_Click"/>
            </StackPanel>

        </StackPanel>
    </ScrollViewer>

</dialogs:ImmersiveDialog>
