<base:WpfUiWindow x:Class="Bloxstrap.UI.Elements.Installer.MainWindow"
        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:pages="clr-namespace:Bloxstrap.UI.Elements.Installer.Pages"
        xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
        xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base"
        xmlns:resources="clr-namespace:Bloxstrap.Resources"
        xmlns:dmodels="clr-namespace:Bloxstrap.UI.ViewModels.Installer"
        xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Installer"
        mc:Ignorable="d"
        d:DataContext="{d:DesignInstance dmodels:MainWindowViewModel, IsDesignTimeCreatable=True}"
        Title="{x:Static resources:Strings.Installer_Title}"
        Height="540" Width="840" MinWidth="840"
        Background="{ui:ThemeResource ApplicationBackgroundBrush}"
        ExtendsContentIntoTitleBar="True"
        WindowBackdropType="Mica"
        WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ui:TitleBar Padding="8" x:Name="RootTitleBar" Grid.Row="0" ForceShutdown="False" MinimizeToTray="False" UseSnapLayout="True" Title="{x:Static resources:Strings.Installer_Title}" Icon="pack://application:,,,/Bloxstrap.ico" />

        <Grid x:Name="RootGrid" Grid.Row="1" Margin="12,12,0,0" Visibility="Visible">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <ui:NavigationFluent x:Name="RootNavigation" Grid.Row="1" Grid.Column="0" Margin="0,0,12,0" Frame="{Binding ElementName=RootFrame}" SelectedPageIndex="0" IsEnabled="False">
                <ui:NavigationFluent.Items>
                    <ui:NavigationItem Content="{x:Static resources:Strings.Installer_Welcome_Title}" PageType="{x:Type pages:WelcomePage}" Icon="ArrowCircleRight48" />
                    <ui:NavigationItem Content="{x:Static resources:Strings.Installer_Install_Title}" PageType="{x:Type pages:InstallPage}" Icon="ArrowCircleRight48" />
                    <ui:NavigationItem Content="{x:Static resources:Strings.Installer_Completion_Title}" PageType="{x:Type pages:CompletionPage}" Icon="ArrowCircleRight48" />
                </ui:NavigationFluent.Items>
            </ui:NavigationFluent>

            <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <ui:Breadcrumb Grid.Row="0" Margin="0,0,0,5" Navigation="{Binding ElementName=RootNavigation}" />
                <Frame x:Name="RootFrame" Grid.Row="1" />
            </Grid>
        </Grid>

        <StatusBar x:Name="RootStatusBar" Grid.Row="2" Padding="14,10" Background="{ui:ThemeResource ApplicationBackgroundBrush}" BorderThickness="0,1,0,0">
            <StatusBar.ItemsPanel>
                <ItemsPanelTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </StatusBar.ItemsPanel>
            <StatusBarItem Grid.Column="1" Padding="0,0,4,0">
                <ui:Button Content="{x:Static resources:Strings.Common_Navigation_Back}" Width="96" Command="{Binding BackPageCommand, Mode=OneWay}" IsEnabled="{Binding BackButtonEnabled, Mode=OneWay}" />
            </StatusBarItem>
            <StatusBarItem Grid.Column="2" Padding="4,0,4,0">
                <ui:Button Name="NextButton" Content="{Binding NextButtonText, Mode=OneWay}" Width="96" Command="{Binding NextPageCommand, Mode=OneWay}" IsEnabled="{Binding NextButtonEnabled, Mode=OneWay}" />
            </StatusBarItem>
            <StatusBarItem Grid.Column="3" Padding="12,0,0,0">
                <ui:Button Content="{x:Static resources:Strings.Common_Close}" Width="96" Command="{Binding CloseWindowCommand, Mode=OneWay}" />
            </StatusBarItem>
        </StatusBar>
    </Grid>
</base:WpfUiWindow>
