<dialogs:ImmersiveDialog xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:automation="clr-namespace:Avalonia.Automation;assembly=Avalonia.Controls"
        xmlns:vm="using:UniGetUI.Avalonia.ViewModels"
        xmlns:dialogs="using:UniGetUI.Avalonia.Views.DialogPages"
        x:Class="UniGetUI.Avalonia.Views.InstallOptionsWindow"
        x:DataType="vm:InstallOptionsViewModel"
        MaxWidth="680"
        MinWidth="500"
        Background="{DynamicResource AppDialogBackground}"
        Title="{Binding DialogTitle}">

    <dialogs:ImmersiveDialog.KeyBindings>
        <KeyBinding Gesture="Ctrl+S" Command="{Binding SaveCommand}"/>
        <KeyBinding Gesture="Meta+S" Command="{Binding SaveCommand}"/>
    </dialogs:ImmersiveDialog.KeyBindings>

    <Grid>
        <ScrollViewer
                      MaxHeight="820"
                      VerticalScrollBarVisibility="Auto"
                      HorizontalScrollBarVisibility="Disabled">
            <StackPanel Margin="16,4,16,16" Spacing="12">

            <dialogs:InstallOptionsControl x:Name="OptionsControl"/>

            <!-- ── Buttons ── -->
            <Grid ColumnDefinitions="*,Auto" ColumnSpacing="8">
                <Button x:Name="SaveButton"
                        Content="{Binding SaveLabel}"
                        automation:AutomationProperties.AcceleratorKey="Ctrl+S"
                        Padding="12,5" CornerRadius="4"
                        HorizontalAlignment="Left"
                        Command="{Binding SaveCommand}"/>
                <Button x:Name="ProceedButton"
                        Grid.Column="1"
                        Content="{Binding ProceedButtonLabel}"
                        Padding="12,5" CornerRadius="4"
                        Command="{Binding ProceedCommand}"/>
            </Grid>

            </StackPanel>
        </ScrollViewer>
    </Grid>
</dialogs:ImmersiveDialog>
