<Window
    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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Name="window" x:Class="TheBoxSoftware.DeveloperSuite.LiveDocumenter.Export"
    xmlns:controls="clr-namespace:TheBoxSoftware.DeveloperSuite.LiveDocumenter.Controls"
	UseLayoutRounding="True"
    Title="Export" Height="378" Width="443" mc:Ignorable="d" WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
	<Window.Resources>
        <DoubleAnimation x:Key="ShrinkWindow" Duration="0:0:0.240" From="368" To="240" />
        <DoubleAnimation x:Key="OptionsHide" Duration="0:0:0.240" From="1" To="0" />
        <DoubleAnimation x:Key="OptionsShow" Duration="0:0:0.480" From="0" To="1" />
	</Window.Resources>
    
    <Window.InputBindings>
        <KeyBinding Key="Escape" Command="ApplicationCommands.Close" />
    </Window.InputBindings>

    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Close" CanExecute="CommandBinding_CanExecute" Executed="CommandBinding_Executed" />
    </Window.CommandBindings>

    <Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="67.9" />
			<RowDefinition Height="*" />
			<RowDefinition Height="43.11" />
		</Grid.RowDefinitions>

        <Border BorderBrush="#FF57bfcb" BorderThickness="0,0,0,1" Background="#FF57bfcb" Margin="0,0,0,-0.04" Height="67.9">
    		<TextBlock Margin="16,16,0,11" Text="Export" TextWrapping="Wrap" FontSize="24" Foreground="#FFFFFFFF"/>
    	</Border>

        <Canvas x:Name="exportProgress" Grid.Row="1" Opacity="0" Margin="0,0.055,0,54.865">
            <ProgressBar x:Name="progressIndicator" Width="408" Height="27" Canvas.Left="8" Canvas.Top="40"/>
            <TextBlock x:Name="progressText" Width="408" Height="28" Text="Starting export" Canvas.Left="8" Canvas.Top="8"/>
        </Canvas>

        <Border Grid.Row="1" x:Name="exportSelection" Opacity="1" >
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="118" />
					<RowDefinition Height="96" />
				</Grid.RowDefinitions>
				<Border Padding="10">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="0.174*" />
							<ColumnDefinition Width="0.826*" />
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="26" />
                            <RowDefinition Height="18" />
							<RowDefinition Height="26" />
							<RowDefinition Height="26" />
						</Grid.RowDefinitions>
												
						<TextBlock Grid.Column="0" Grid.Row="0" Text="Publish To" Height="22" VerticalAlignment="Center" />
						<WrapPanel Grid.Column="1" Grid.Row="0" Margin="0,0,0,4">
							<TextBox x:Name="publishTo" Height="22" Width="310" />
							<Button x:Name="fileDialogOpen" Content="..." Width="22" Margin="3,0,0,0" Click="fileDialogOpen_Click" />
						</WrapPanel>
                        <TextBlock Grid.Column="1" Grid.Row="1" Foreground="#FFB80000" Margin="0,-3,0,0">A new folder will be created in this directory.</TextBlock>
						
						<TextBlock Grid.Column="0" Grid.Row="2" Text="Visibility" Height="22" VerticalAlignment="Center" />
			            <controls:ComboWithCheckboxes x:Name="visibility" DefaultText="Document Public members" Grid.Column="1" Grid.Row="2" Height="22" Margin="0,0,0,4" />
						
						<TextBlock Grid.Column="0" Grid.Row="3" Text="Export" Height="22" VerticalAlignment="Center" />
						<ComboBox Grid.Column="1" Grid.Row="3" Height="22" x:Name="outputSelection" SelectedIndex="0" SelectionChanged="outputSelection_SelectionChanged" Margin="0,0,0,4">
							<ComboBox.ItemTemplate>
								<DataTemplate>
									<TextBlock Text="{Binding Name}" />
								</DataTemplate>
							</ComboBox.ItemTemplate>
						</ComboBox>
					</Grid>
				</Border>
				<Canvas Grid.Row="1">
					<Border HorizontalAlignment="Left" Background="White" BorderBrush="#FFEFEFEF" Width="100" BorderThickness="1" Grid.Row="1" Height="100" Canvas.Left="8">
                        <Grid>
                            <Image x:Name="exportLogo" Source="resources\exp_48x48.png" Opacity="0.5" Width="48" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            <Image x:Name="exportImage" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            <Image x:Name="warningImage" Source="resources\sinfo_48x48.png" Opacity="0.5" Width="48" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" />
                        </Grid>
                    </Border>
					<TextBlock x:Name="exportType" Width="294" Canvas.Left="114" FontWeight="Bold">Export type</TextBlock>
					<TextBlock x:Name="exportDescription" Width="294" Canvas.Left="114" Canvas.Top="20" Height="60" TextWrapping="Wrap">Description</TextBlock>
					<TextBlock x:Name="exportVersion" Canvas.Left="114" Canvas.Top="84">v</TextBlock>
				</Canvas>				
			</Grid>
		</Border>
		
    	<Border BorderBrush="#FFB1A6A6" BorderThickness="0,1,0,0" Background="#FFCDB0B0" Grid.Row="2" Margin="0,-0.03,0,0">
    		<Grid Background="#FFE8EEEF" Height="43.11">
    			<StackPanel Margin="0,8,8,8" Orientation="Horizontal" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right">
    				<StackPanel.RenderTransform>
    					<TransformGroup>
    						<ScaleTransform ScaleX="1" ScaleY="1"/>
    						<SkewTransform AngleX="0" AngleY="0"/>
    						<RotateTransform Angle="0"/>
    						<TranslateTransform/>
    					</TransformGroup>
    				</StackPanel.RenderTransform>
    				<Button HorizontalAlignment="Right" Width="68" Content="Settings" VerticalAlignment="Bottom" x:Name="settings" Click="button_Click" Margin="5,0,0,0" Height="25" Visibility="Hidden" />
    				<Button Width="63" Content="Cancel" VerticalAlignment="Bottom" x:Name="cancel" Click="button_Click" Margin="5,0,0,0" Height="25" />
    				<Button Width="61" Content="Export" VerticalAlignment="Bottom" x:Name="export" Click="button_Click" Margin="5,0,0,0" Height="25" />
    				<Button Width="60" Content="Finish" VerticalAlignment="Bottom" x:Name="finish" Click="button_Click" Margin="5,0,0,0" IsEnabled="False" Height="25" Visibility="Collapsed" />
    			</StackPanel>
    		</Grid>
    	</Border>
    </Grid>
</Window>
