<UserControl x:Class="Deployer.Raspberry.Gui.Views.Parts.DeploymentPart"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
             xmlns:parts="clr-namespace:Deployer.Raspberry.Gui.Views.Parts"
             xmlns:Interactions="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:ui="clr-namespace:Deployer.UI;assembly=Deployer.UI"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800"
             DataContext="{Binding Source={StaticResource Locator}, Path=DeploymentViewModel}" mah:DialogParticipation.Register="{Binding}">

    <Interactions:Interaction.Triggers>
        <Interactions:EventTrigger EventName="Loaded">
            <Interactions:EventTrigger.Actions>
                <!--<Interactions:InvokeCommandAction Command="{Binding ShowWarningCommand}" />-->
                <Interactions:InvokeCommandAction Command="{Binding RefreshDisksCommandWrapper.Command}" />
            </Interactions:EventTrigger.Actions>
        </Interactions:EventTrigger>
    </Interactions:Interaction.Triggers>

    <Grid Visibility="{Binding FullInstallWrapper.IsExecuting, Converter={StaticResource CollapseOnTrue}}">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <StackPanel>
            <TextBlock Margin="12,6,12,18" FontSize="16" TextWrapping="Wrap">Use this section to deploy or redeploy <Bold>Windows 10 ARM64</Bold> into your Raspberry Pi.</TextBlock>
        </StackPanel>

        <Grid Grid.Row="1">

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            <UniformGrid Columns="1" >
                <parts:DiskSelectionPart Margin="8" />
                <parts:WimOptionsPart  Margin="8" />
            </UniformGrid>

            <ui:IconButton Grid.Row="1" VerticalAlignment="Center" Command="{Binding FullInstallWrapper.Command}"
                               IsBusy="{Binding FullInstallWrapper.IsExecuting}" Content="Deploy"
                               Height="50"                               
                               HorizontalAlignment="Center"
                               ToolTip="Use this option to deploy Windows to your SD Card">
                <ui:IconButton.Icon>
                    <iconPacks:PackIconFontAwesome
                        Kind="RocketSolid" Style="{StaticResource ButtonIconStyle}" />
                </ui:IconButton.Icon>
            </ui:IconButton>

        </Grid>
    </Grid>
</UserControl>
