<Window 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"
        mc:Ignorable="d" d:DesignWidth="360" d:DesignHeight="200"
		MinWidth="370" MinHeight="200"
		Width="370" Height="200"
		WindowStartupLocation="CenterOwner"
		xmlns:controls="clr-namespace:LibationAvalonia.Controls"
        x:Class="LibationAvalonia.Dialogs.Login.LoginChoiceEagerDialog"
        Title="Audible Login"
		Icon="/Assets/libation.ico" >

	<Grid RowDefinitions="Auto,Auto,Auto,*" ColumnDefinitions="*" Margin="5">
		
		<StackPanel
			Grid.Row="0"
			Orientation="Horizontal">
			
			<TextBlock Text="Locale: " />
			<TextBlock Text="{Binding Account.Locale.Name}" />
			
		</StackPanel>
		
		<StackPanel			
			Grid.Row="1"
			Orientation="Horizontal">
			
			<TextBlock Text="Username: " />
			<TextBlock Text="{Binding Account.AccountId}" />
			
		</StackPanel>

		<Grid
			Grid.Row="2"
			Grid.Column="0"
			Margin="0,5,0,5"
			ColumnDefinitions="Auto,*,Auto">
			
			<TextBlock
				Grid.Column="0"
				VerticalAlignment="Center"
				Text="Password: " />
			
			<TextBox
				Grid.Column="1"
				PasswordChar="*"
				Text="{Binding Password, Mode=TwoWay}" />
			<Button
				Margin="5,0"
				Grid.Column="2"
				VerticalAlignment="Stretch"
				Content="Submit"
				Command="{Binding SaveAndCloseAsync}" />
		</Grid>

		<StackPanel
			Grid.Row="3"
			VerticalAlignment="Bottom">

			<controls:LinkLabel
				Tapped="ExternalLoginLink_Tapped"
				Text="Trouble logging in? Click here to log in with your browser." />
			
			<TextBlock
				TextWrapping="Wrap"
				Text="This more advanced login is recommended if you're experiencing errors logging in the conventional way above or if you're not comfortable typing your password here." />
			
		</StackPanel>		
	</Grid>
</Window>
