<UserControl 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:customControls="clr-namespace:Nebula.Launcher.Controls"
             xmlns:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Nebula.Launcher.Views.Popup.LoadingContextView"
             x:DataType="popup:LoadingContextViewModel">
    <Design.DataContext>
        <popup:LoadingContextViewModel />
    </Design.DataContext>
    <StackPanel Margin="25" Spacing="15">
        <ProgressBar Height="40" Maximum="{Binding CurrJobs}" Value="{Binding ResolvedJobs}" />
        <Panel>
            <StackPanel Orientation="Horizontal" Spacing="5" HorizontalAlignment="Left" VerticalAlignment="Center">
                <Label>
                    <TextBlock Text="{Binding ResolvedJobs}" />
                </Label>
                <Label>
                    /
                </Label>
                <Label>
                    <TextBlock Text="{Binding CurrJobs}" />
                </Label>
            </StackPanel>

            <Button 
                HorizontalAlignment="Right" 
                VerticalAlignment="Center" 
                Command="{Binding Cancel}" 
                IsVisible="{Binding IsCancellable}">
                <customControls:LocalizedLabel LocalId="task-cancel"/> 
            </Button>
        </Panel>
        <Panel>
            <Border Background="{StaticResource DefaultForeground}" MinHeight="210">
                <TextBlock TextWrapping="Wrap" Text="{Binding Message}" MaxLines="10" Margin="15"/>
            </Border>
        </Panel>
    </StackPanel>
</UserControl>