<Window xmlns="https://github.com/avaloniaui"
        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:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
        xmlns:submissionWizard="clr-namespace:Artemis.UI.Screens.Workshop.SubmissionWizard"
        xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
        xmlns:ui="clr-namespace:Artemis.UI"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="Artemis.UI.Screens.Workshop.SubmissionWizard.ReleaseWizardView"
        x:DataType="submissionWizard:ReleaseWizardViewModel"
        Icon="/Assets/Images/Logo/application.ico"
        Title="Artemis | Workshop release wizard"
        Width="1000"
        Height="950"
        WindowStartupLocation="CenterOwner">
    <Grid Margin="15" RowDefinitions="Auto,*,Auto">
        <Grid RowDefinitions="*,*" ColumnDefinitions="Auto,*,Auto" Margin="0 0 0 15">
            <ContentControl Grid.Column="0" Grid.RowSpan="2" Width="65" Height="65" VerticalAlignment="Center" Margin="0 0 20 0" Content="{CompiledBinding CurrentUserViewModel}"/>
            <TextBlock Grid.Row="0" Grid.Column="1" FontSize="36" VerticalAlignment="Bottom" Text="{CompiledBinding CurrentUserViewModel.Name}" IsVisible="{CompiledBinding !CurrentUserViewModel.IsAnonymous}"/>
            <TextBlock Grid.Row="0" Grid.Column="1" FontSize="36" VerticalAlignment="Bottom" Text="Not logged in" IsVisible="{CompiledBinding CurrentUserViewModel.IsAnonymous}"/>

            <StackPanel Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <HyperlinkButton Classes="icon-button" ToolTip.Tip="View Wiki" NavigateUri="https://wiki.artemis-rgb.com?mtm_campaign=artemis&amp;mtm_kwd=workshop-wizard">
                    <avalonia:MaterialIcon Kind="BookOpenOutline" />
                </HyperlinkButton>
            </StackPanel>

            <TextBlock Grid.Row="1"
                       Grid.Column="1"
                       VerticalAlignment="Top"
                       Classes="subtitle"
                       Text="New workshop release" />
        </Grid>

        <Border Classes="card" Grid.Row="1" Grid.Column="0">
            <controls:Frame Name="Frame" IsNavigationStackEnabled="False" CacheSize="0">
                <controls:Frame.NavigationPageFactory>
                    <ui:PageFactory/>
                </controls:Frame.NavigationPageFactory>
            </controls:Frame>
        </Border>

        <StackPanel IsVisible="{CompiledBinding Screen, Converter={x:Static ObjectConverters.IsNotNull}}" 
                    Grid.Row="2" 
                    Grid.Column="0" 
                    HorizontalAlignment="Right"
                    Orientation="Horizontal"
                    Spacing="5"
                    Margin="0 15 0 0">
            <Button Command="{CompiledBinding Screen.GoBack}" IsVisible="{CompiledBinding Screen.ShowGoBack}">
                Back
            </Button>
            <Button Command="{CompiledBinding Screen.Continue}" IsVisible="{CompiledBinding !Screen.ShowFinish}" Width="80" Content="{CompiledBinding Screen.ContinueText}"/>
            <Button Command="{CompiledBinding Screen.Continue}" IsVisible="{CompiledBinding Screen.ShowFinish}" Width="80">
                Finish
            </Button>
        </StackPanel>
    </Grid>

</Window>