<?xml version="1.0" encoding="utf-8" ?>
<local:StartupPageBase
    x:Class="RodelAgent.UI.Pages.StartupPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:RodelAgent.UI.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="using:RodelAgent.UI.Extensions"
    xmlns:local="using:RodelAgent.UI.Pages"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:startup="using:RodelAgent.UI.Controls.Startup"
    mc:Ignorable="d">

    <SplitView
        x:Name="MainSplitView"
        CompactPaneLength="0"
        DisplayMode="CompactOverlay"
        IsPaneOpen="False"
        LightDismissOverlayMode="On"
        OpenPaneLength="400"
        PaneClosed="OnPaneClosed"
        PanePlacement="Right">
        <SplitView.Pane>
            <Grid>
                <Frame x:Name="SideFrame" Margin="0,12,0,0" />
            </Grid>
        </SplitView.Pane>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid Background="{ThemeResource LayerFillColorDefaultBrush}">
                <startup:StartupWelcomeSection Visibility="{x:Bind ViewModel.IsWelcomeStep, Mode=OneWay}" />
                <startup:StartupChatSection Visibility="{x:Bind ViewModel.IsOnlineChatStep, Mode=OneWay}" />
                <startup:StartupDrawSection Visibility="{x:Bind ViewModel.IsOnlineDrawStep, Mode=OneWay}" />
                <startup:StartupAudioSection Visibility="{x:Bind ViewModel.IsOnlineAudioStep, Mode=OneWay}" />
                <startup:StartupTranslateSection Visibility="{x:Bind ViewModel.IsOnlineTranslateStep, Mode=OneWay}" />
                <startup:StartupFinishSection Visibility="{x:Bind ViewModel.IsLastStep, Mode=OneWay}" />

                <StackPanel
                    Padding="20,12"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}"
                    CornerRadius="{StaticResource OverlayCornerRadius}"
                    Spacing="8"
                    Visibility="{x:Bind ViewModel.IsMigrating, Mode=OneWay}">
                    <ProgressRing
                        Width="28"
                        Height="28"
                        HorizontalAlignment="Center"
                        IsActive="{x:Bind ViewModel.IsMigrating, Mode=OneWay}" />
                    <TextBlock
                        MaxWidth="160"
                        HorizontalAlignment="Center"
                        Style="{StaticResource CaptionTextBlockStyle}"
                        Text="{ext:Locale Name=V1Migrating}"
                        TextAlignment="Center"
                        TextWrapping="Wrap" />
                </StackPanel>
            </Grid>

            <startup:StartupPageFooter Grid.Row="1" />
        </Grid>
    </SplitView>

</local:StartupPageBase>
