<UserControl xmlns="https://github.com/avaloniaui"
             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"
             xmlns:vm="clr-namespace:GitCredentialManager.UI.ViewModels;assembly=gcmcore"
             xmlns:converters="clr-namespace:GitCredentialManager.UI.Converters;assembly=gcmcore"
             mc:Ignorable="d" d:DesignWidth="420"
             x:Class="GitCredentialManager.UI.Views.CredentialsView">
    <Design.DataContext>
        <vm:CredentialsViewModel/>
    </Design.DataContext>
    <DockPanel>
        <StackPanel DockPanel.Dock="Top" Margin="10,0,10,10">
            <StackPanel Margin="0"
                        Orientation="Horizontal"
                        HorizontalAlignment="Center"
                        IsVisible="{Binding ShowProductHeader}">
                <Image Margin="0,0,10,0"
                       VerticalAlignment="Center"
                       Source="{DynamicResource GcmLogo}"
                       Width="32" Height="32" />
                <TextBlock Text="Git Credential Manager"
                           VerticalAlignment="Center"
                           FontSize="18"
                           FontWeight="Light"/>
            </StackPanel>

            <TextBlock Text="{Binding Description}"
                       FontSize="14"
                       HorizontalAlignment="Center"
                       TextWrapping="Wrap"
                       Margin="0,15,0,15"/>
        </StackPanel>

        <StackPanel Margin="20,0">
            <TextBox x:Name="_userNameTextBox"
                     Watermark="Username" Margin="0,0,0,10"
                     Text="{Binding UserName}"/>
            <TextBox x:Name="_passwordTextBox"
                     Watermark="Password" Margin="0,0,0,20"
                     PasswordChar="●"
                     Text="{Binding Password}"/>
            <Button Content="Continue"
                    IsDefault="True"
                    Command="{Binding SignInCommand}"
                    HorizontalAlignment="Center"
                    Classes="accent"/>
        </StackPanel>
    </DockPanel>
</UserControl>
