<?xml version="1.0" encoding="utf-8" ?>
<local:StartupPageControlBase
    x:Class="RodelAgent.UI.Controls.Startup.StartupPageFooter"
    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:ext="using:RodelAgent.UI.Extensions"
    xmlns:local="using:RodelAgent.UI.Controls.Startup"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid
        Grid.Row="1"
        Padding="28,24"
        BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}"
        BorderThickness="0,1,0,0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <PipsPager
            x:Name="Pager"
            HorizontalAlignment="Left"
            VerticalAlignment="Center"
            IsEnabled="False"
            MaxVisiblePips="10"
            NumberOfPages="{x:Bind ViewModel.StepCount, Mode=OneWay}"
            SelectedPageIndex="{x:Bind ViewModel.CurrentStep, Mode=TwoWay}" />
        <StackPanel
            Grid.Column="1"
            VerticalAlignment="Center"
            Orientation="Horizontal"
            Spacing="12"
            Visibility="{x:Bind ViewModel.IsLastStep, Converter={StaticResource BoolToVisibilityReverseConverter}, Mode=OneWay}">
            <HyperlinkButton
                MinWidth="120"
                AutomationProperties.Name="{ext:Locale Name=PrevStep}"
                Command="{x:Bind ViewModel.GoPrevCommand, Mode=OneWay}"
                Content="{ext:Locale Name=PrevStep}"
                Visibility="{x:Bind ViewModel.IsPreviousStepShown, Mode=OneWay}" />
            <Grid>
                <Button
                    MinWidth="120"
                    AutomationProperties.Name="{ext:Locale Name=SelectFolder}"
                    Command="{x:Bind ViewModel.SelectFolderCommand, Mode=OneWay}"
                    Content="{ext:Locale Name=SelectWorkDirectory}"
                    Style="{StaticResource AccentButtonStyle}"
                    Visibility="{x:Bind ViewModel.SelectedFolder, Mode=OneWay, Converter={StaticResource ObjectToVisibilityReverseConverter}}" />
                <Button
                    MinWidth="120"
                    AutomationProperties.Name="{ext:Locale Name=NextStep}"
                    Command="{x:Bind ViewModel.GoNextCommand, Mode=OneWay}"
                    Content="{ext:Locale Name=NextStep}"
                    Style="{StaticResource AccentButtonStyle}"
                    Visibility="{x:Bind ViewModel.SelectedFolder, Mode=OneWay, Converter={StaticResource ObjectToVisibilityConverter}}" />
            </Grid>
        </StackPanel>
        <Button
            Grid.Column="1"
            MinWidth="120"
            VerticalAlignment="Center"
            AutomationProperties.Name="{ext:Locale Name=LaunchApp}"
            Command="{x:Bind ViewModel.RestartCommand}"
            Content="{ext:Locale Name=LaunchApp}"
            Style="{StaticResource AccentButtonStyle}"
            Visibility="{x:Bind ViewModel.IsLastStep, Mode=OneWay}" />
    </Grid>
</local:StartupPageControlBase>
