<local:GenericLogin2FaView x:Class="GitHub.VisualStudio.Views.Dialog.Login2FaView" 
    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:ghfvs="https://github.com/github/VisualStudio"
    xmlns:local="clr-namespace:GitHub.VisualStudio.Views.Dialog"
    xmlns:controls="clr-namespace:GitHub.VisualStudio.UI.Controls"
    mc:Ignorable="d"
    d:DesignWidth="414"
    d:DesignHeight="440"
    Style="{DynamicResource DialogUserControl}"
    xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
    Background="{DynamicResource {x:Static vs:ThemedDialogColors.WindowPanelBrushKey}}"
    Foreground="{DynamicResource {x:Static vs:ThemedDialogColors.WindowPanelTextBrushKey}}"
    AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TwoFactorAuthenticationCustom}" >

    <Control.Resources>
        <ResourceDictionary Source="DialogStyles.xaml" />
    </Control.Resources>

    <StackPanel
        Style="{DynamicResource DialogContainerStackPanel}"
        ghfvs:AccessKeysManagerScoping.IsEnabled="True">
        <ghfvs:OcticonImage Icon="logo_github" Style="{DynamicResource GitHubLogo}" />
        <WrapPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="0,0,0,12">
            <TextBlock 
                Text="{x:Static ghfvs:Resources.twoFactorAuthText}" 
                Padding="0" 
                Margin="0,0,12,0"
                Style="{DynamicResource GitHubH1TextBlock}" />
        </WrapPanel>

        <controls:HorizontalShadowDivider />

        <TextBlock
            Margin="30,0,30,16"
            HorizontalAlignment="Center"
            TextWrapping="Wrap"
            Style="{DynamicResource GitHubDescriptionTextBlock}"
            AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TwoFactorAuthenticationInformationTextBlock}" >
            <Run x:Name="description" Text="{x:Static ghfvs:Resources.openTwoFactorAuthAppText}"/>
            <Hyperlink x:Name="twoFactorReadMoreLink" ToolTip="https://help.github.com/articles/about-two-factor-authentication" 
                       AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TwoFactorAuthenticationLearnMoreHyperlink}">
                <Run Text="{x:Static ghfvs:Resources.learnMoreLink}"/>
            </Hyperlink>
        </TextBlock>
        <ghfvs:TwoFactorInput
            x:Name="authenticationCode"
            TabIndex="1" 
            AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TwoFactorAuthenticatonInputCustom}" />
        <Grid Margin="0,12,0,0" Height="18">
            <ghfvs:ErrorMessageDisplay
                x:Name="authenticationFailedLabel"
                Message="{x:Static ghfvs:Resources.authenticationFailedLabelMessage}"
                Content="{x:Static ghfvs:Resources.authenticationFailedLabelContent}" />
            <ghfvs:ErrorMessageDisplay
                x:Name="authenticationSentLabel"
                Icon="check"
                IconFill="{DynamicResource GitHubAccentBrush}"
                Message="{x:Static ghfvs:Resources.authenticationSentLabelMessage}"
                Content="{x:Static ghfvs:Resources.authenticationSentLabelContent}" />
        </Grid>
        <StackPanel
            Orientation="Horizontal"
            HorizontalAlignment="Center"
            Margin="0,18,0,60">
            <Button
                x:Name="okButton"
                TabIndex="2"
                IsDefault="True"
                Content="{x:Static ghfvs:Resources.verifyText}"
                AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TwoFactorAuthenticatonVerifyButton}" />
            <Button 
                x:Name="resendCodeButton"
                TabIndex="3"
                ToolTip="{x:Static ghfvs:Resources.resendCodeButtonToolTip}"
                FontSize="12"
                Margin="18,0,0,0"
                Content="{x:Static ghfvs:Resources.resendCodeButtonContent}" />
        </StackPanel>
    </StackPanel>
</local:GenericLogin2FaView>
