<ContentControl x:Class="Microsoft.VisualStudio.TestTools.TestCaseMigrator.ConfirmSettingsView"
                                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                 xmlns:TestCaseMigrator="clr-namespace:Microsoft.VisualStudio.TestTools.TestCaseMigrator"
                                 x:ClassModifier="internal">
    <ContentControl.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="FontSize" 
                    Value="13" />
            <Setter Property="TextWrapping"
                    Value="Wrap" />
            <Setter Property="Padding"
                    Value="15,0,0,0" />
        </Style>

        <Style TargetType="{x:Type BulletDecorator}">
            <Setter Property="Margin" 
                    Value="20,20,0,0" />
        </Style>
        <Style TargetType="{x:Type Image}">
            <Setter Property="Source"
                    Value="{DynamicResource Bullet_16}" />
            <Setter Property="Height"
                    Value="8" />
            <Setter Property="Width"
                    Value="8" />
            <Setter Property="Margin"
                    Value="0,1,0,0" />
            <Setter Property="VerticalAlignment"
                    Value="Top" />
        </Style>

        <TestCaseMigrator:StringToVisibilityConverter x:Key="StringToVisibilityConverter" />



    </ContentControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Background="White"
            Grid.Row="0"
            BorderBrush="Gray"
            CornerRadius="2"
            BorderThickness="1">
            <ScrollViewer VerticalScrollBarVisibility="Auto">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <TextBlock Text="Click &apos;Save and migrate&apos; to perform the following actions:"
                           FontWeight="Bold"
                           Margin="0,5,0,0"
                           Grid.Row="0"
                           FontSize="14" />
                    <BulletDecorator Grid.Row="1">
                        <BulletDecorator.Bullet>
                            <Image />
                        </BulletDecorator.Bullet>
                        <BulletDecorator.Child>
                            <TextBlock Grid.Row="0"
                                       Text="Migrate the test cases:" />
                        </BulletDecorator.Child>
                    </BulletDecorator>

                    <Grid Grid.Row="2"
                      Margin="50,0,0,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="10" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0"
                                           Text="From"
                                           FontWeight="SemiBold"
                                           TextDecorations="Underline"/>
                        <Grid Grid.Row="1">
                            <Grid>
                                <Grid.Style>
                                    <Style TargetType="{x:Type Grid}">
                                        <Setter Property="Visibility" Value="Collapsed" />
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding Info.DataSourceType}"
                                     Value="{x:Static TestCaseMigrator:DataSourceType.Excel}">
                                                <Setter Property="Visibility" Value="Visible" />
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Grid.Style>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <TextBlock Grid.Row="0"
                                           Text="{Binding Info.DataSourceParser.StorageInfo.Source, StringFormat=Excel workbook: \&quot;{0}\&quot;}" />
                                <TextBlock Grid.Row="1"
                                       Text="{Binding Info.DataSourceParser.StorageInfo.WorkSheetName, StringFormat=Excel worksheet: \&quot;{0}\&quot;}" />
                                <TextBlock Grid.Row="2"
                                       Text="{Binding Info.DataSourceParser.StorageInfo.HeaderRow, StringFormat=Column names on Row number \&quot;{0}\&quot;}" />
                            </Grid>
                            <Grid>
                                <Grid.Style>
                                    <Style TargetType="{x:Type Grid}">
                                        <Setter Property="Visibility" Value="Collapsed" />
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding Info.DataSourceType}"
                                     Value="{x:Static TestCaseMigrator:DataSourceType.MHT}">
                                                <Setter Property="Visibility" Value="Visible" />
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Grid.Style>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <TextBlock Grid.Row="0"
                                           Text="{Binding Info.MHTSource, StringFormat=MHT/Word Source: \&quot;{0}\&quot;}" />
                            </Grid>
                        </Grid>

                        <TextBlock Grid.Row="3"
                                       Text="To"
                                       FontWeight="SemiBold"
                                       TextDecorations="Underline"/>
                        <TextBlock Grid.Row="4"
                                       Text="{Binding Info.WorkItemGenerator.Server, StringFormat=TFS collection: \&quot;{0}\&quot;}" />
                        <TextBlock Grid.Row="5"
                                       Text="{Binding Info.WorkItemGenerator.Project, StringFormat=Team project: \&quot;{0}\&quot;}" />
                        <TextBlock Grid.Row="6"
                                       Text="{Binding Info.WorkItemGenerator.WorkItemTypeName, StringFormat=Test workitem type: \&quot;{0}\&quot;}" />
                    </Grid>


                    <BulletDecorator Grid.Row="3"
                                 Visibility="{Binding Info.InputSettingsFilePath, Converter={StaticResource StringToVisibilityConverter}}">
                        <BulletDecorator.Bullet>
                            <Image />
                        </BulletDecorator.Bullet>
                        <BulletDecorator.Child>
                            <TextBlock Text="{Binding Info.InputSettingsFilePath, StringFormat=Use existing settings file to migrate: \&quot;{0}\&quot;}" />
                        </BulletDecorator.Child>
                    </BulletDecorator>

                    <BulletDecorator Grid.Row="4"
                                 Visibility="{Binding Info.OutputSettingsFilePath, Converter={StaticResource StringToVisibilityConverter}}">
                        <BulletDecorator.Bullet>
                            <Image />
                        </BulletDecorator.Bullet>
                        <BulletDecorator.Child>
                            <TextBlock Text="{Binding Info.OutputSettingsFilePath, StringFormat=Save current column and data mappings and miscellaneous settings at: \&quot;{0}\&quot;}" />
                        </BulletDecorator.Child>
                    </BulletDecorator>

                    <BulletDecorator Grid.Row="5"
                                 Visibility="{Binding Info.Reporter.ReportFile, Converter={StaticResource StringToVisibilityConverter}}">
                        <BulletDecorator.Bullet>
                            <Image />
                        </BulletDecorator.Bullet>
                        <BulletDecorator.Child>
                            <TextBlock Text="{Binding Info.Reporter.ReportFile, StringFormat=Save output logs(Passed/Warning/Failed) to: \&quot;{0}\&quot;}" />
                        </BulletDecorator.Child>
                    </BulletDecorator>

                </Grid>
            </ScrollViewer>
        </Border>
        <TextBlock Grid.Row="1"
                   HorizontalAlignment="Right"
                   Margin="0,5,0,0">
                    <Hyperlink IsEnabled="{Binding IsPreviewEnabled}"
                               AutomationProperties.AutomationId="ConfirmSettings.PreviewMHTButton"
                               AutomationProperties.Name="PreviewMHTButton"
                               Click="Hyperlink_Click"
                               x:Uid="ConfirmSettings.PreviewMHTButton">
                        Copy commandline to clipboard
                        <Hyperlink.Style>
                            <Style TargetType="{x:Type Hyperlink}">
                                <Setter Property="Foreground" 
                                        Value="{DynamicResource HyperLinkBrush}" />
                            </Style>
                        </Hyperlink.Style>
                    </Hyperlink>
        </TextBlock>
    </Grid>
</ContentControl>