﻿<common:PageBase
    x:Class="FeedbackApp.UIF.Views.ThankYouPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FeedbackApp.UIF.Views"
    xmlns:common="using:FeedbackApp.Common"
    xmlns:conv="using:FeedbackApp.Converters"
    xmlns:controls="using:FeedbackApp.UIF.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    x:Name="pageRoot"
    mc:Ignorable="d">
    <common:PageBase.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="UIFStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </common:PageBase.Resources>
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="40"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="116.667"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <TextBlock x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_Title" HorizontalAlignment="Left" Style="{StaticResource PageHeaderFeature}" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="53.333" 
                       Margin="0,0,0,9.667" FontFamily="Segoe UI Light" Text="Thank you" Foreground="{ThemeResource BlueTextColor}"
                       Grid.Column="1"/>
            <Grid Grid.Row="1" Grid.Column="1" Height="Auto" Margin="0,20,0,30" MinHeight="25">
                <TextBlock x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_PageContentPart1" TextWrapping="Wrap" Text="Although we aren't able to respond directly, we value every piece of feedback we receive and will use it to improve your experience." Style="{StaticResource BodyTextBlockStyle}"
                       Height="Auto"/>
            </Grid>

            <StackPanel Grid.Row="2" Grid.Column="1" Margin="0,0,0,20" Visibility="{Binding IsInternalUser, Converter={StaticResource BooleanToVisibilityConverter}}">
                <!-- TODO: Only display to internal users, collapsing all the time for now -->
                <RichTextBlock Margin="0,0,0,5" Style="{StaticResource BodyRichTextBlockStyle}">
                    <Paragraph>
                        <Run x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_Internal_reciept_pre" Text="As a Microsoft Employee, you can find your submitted feedback "/>
                        <Hyperlink NavigateUri="{Binding SubmittedFeedbacksUrl}" x:Uid="/FeedbackApp.Resources/UIF_Shared_here">
                            <Run x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_Internal_reciept_link" Text="here">
                            </Run>
                        </Hyperlink>
                        <Run x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_Internal_reciept_post" Text="."/>
                    </Paragraph>
                </RichTextBlock>
                <RichTextBlock Grid.Row="2" Grid.Column="1"  Margin="0,0,0,5" Style="{StaticResource BodyRichTextBlockStyle}"
                           Visibility="{Binding IsPromoted, Converter={StaticResource BooleanToVisibilityConverter}}">
                    <Paragraph>
                        <Run x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_Internal_Promotion_receipt" Text="An email will be shortly sent with a link to the bug."/>
                    </Paragraph>
                </RichTextBlock>
            </StackPanel>

            <StackPanel Grid.Row="3" Grid.Column="1" Margin="0,0,0,20" Visibility="{Binding IsInsiderHubPresent, Converter={StaticResource ReverseBooleanToVisibilityConverter}}">
                <RichTextBlock Margin="0,0,0,5" Style="{StaticResource BodyRichTextBlockStyle}">
                    <Paragraph>
                        <Run x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_Use_InsiderHub" Text="Use the Insider Hub app to keep up with the latest Windows Insider Program news."/>
                        <Hyperlink NavigateUri="ms-settings:optionalfeatures" x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_GetItHere">
                            <Run x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_Get_InsiderHub_Link" Text="Get it here."/>
                        </Hyperlink>
                    </Paragraph>
                </RichTextBlock>
            </StackPanel>

            <Button Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
            x:Uid="/FeedbackApp.Resources/UIF_ThankYouControl_StartOverButton"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            Margin="0"
            Grid.Row="4" Content="Go back" Grid.Column="1" Style="{StaticResource UIFButton}"/>
        </Grid>
    </Grid>
</common:PageBase>

