<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="using:CheckArticlesForSpam.ViewModels"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="CheckArticlesForSpam.Views.AuthorizationPage"
	         x:DataType="vm:MainWindowViewModel">

	<UserControl.Styles>
		<Style Selector="TextBox">
			<Setter Property="FontFamily" Value="{StaticResource TextInBox}" />
			<Setter Property="Foreground" Value="#7f5e38"/>
			<Setter Property="CornerRadius" Value="20"/>
			<Setter Property="BorderThickness" Value="0"/>
		</Style>
		<Style Selector="TextBlock">
			<Setter Property="FontFamily" Value="{StaticResource TitleFont}" />
		</Style>
		<Style Selector="Button">
			<Setter Property="FontFamily" Value="{StaticResource TitleFont}" />

		</Style>
	</UserControl.Styles>

	<Grid Background="#ebe2d9" RowDefinitions="*" ColumnDefinitions="*, *">
		<StackPanel Orientation="Horizontal">
			<Image
			Grid.Row="0"
			Grid.Column="0"
			Source="avares://CheckArticlesForSpam/Assets/BackgoundStartPage.jpg"
			Stretch="Fill"
			VerticalAlignment="Top"/>
		</StackPanel>
		<Border
			Grid.Row="0" Grid.Column="1"
			Background="#ebe2d9"
			Padding="20"
			Width="440">
			<StackPanel
				Orientation="Vertical"
				VerticalAlignment="Center"
				HorizontalAlignment="Center"
				Width="400">
				<TextBlock
					FontSize="50"
					Foreground="#7f5e38"
					HorizontalAlignment="Center"
					Text="ВХОД"/>
				<TextBox
					FontSize="25"
					Watermark="ЛОГИН"
					Padding="15 15 15 10"
					Margin="0 30 0 30"
					Text="{Binding AuthorizationPageVM.Login}"/>
				<StackPanel HorizontalAlignment="Right">
					<Button
						Background="Transparent"
						Foreground="#7f5e38"
						Content="Показать пароль"
						Margin="0 -10 0 -5"
						Command="{Binding ShowHidePasswordAuthorization}">
						<Button.Styles>
							<Style Selector="Button:pointerover /template/ ContentPresenter">
								<Setter Property="Background" Value="Transparent"></Setter>
								<Setter Property="Foreground" Value="#D8B389"></Setter>
							</Style>
						</Button.Styles>
					</Button>
				</StackPanel>
				<TextBox
					FontSize="25"
					Watermark="ПАРОЛЬ"
					PasswordChar="{Binding AuthorizationPageVM.PasswordChar}"
					Padding="15 15 15 10"
					Margin="0 0 0 30"
					Text="{Binding AuthorizationPageVM.Password}"/>

				<StackPanel
					Orientation="Horizontal"
					HorizontalAlignment="Center"
					VerticalAlignment="Center">
					<TextBlock
						FontSize="25"
						HorizontalAlignment="Center"
						VerticalAlignment="Center"
						Foreground="#D8B389"
						Text="НЕТ АККАУНТА?"/>
					<Button
						FontSize="25"
						Foreground="#946E42"
						Content="ЗАРЕГИСТРИРУЙТЕСЬ"
						Background="Transparent"
						Command="{Binding ToRegistrationPage}">
						<Button.Styles>
							<Style Selector="Button:pointerover /template/ ContentPresenter">
								<Setter Property="Background" Value="Transparent"></Setter>
								<Setter Property="Foreground" Value="#D8B389"></Setter>
							</Style>
						</Button.Styles>
					</Button>
				</StackPanel>
				<TextBlock
					FontSize="24"
					Foreground="Red"
					HorizontalAlignment="Center"
					Margin="0 10 0 0"
					Text="{Binding AuthorizationPageVM.Message}"/>
				<Button
					CornerRadius="20"
					Content="ВОЙТИ"
					Background="#7f5e38"
					Foreground="White"
					FontSize="25"
					Padding="20 10 20 10"
					HorizontalAlignment="Stretch"
					HorizontalContentAlignment="Center"
					Margin="0 10 0 0"
					Command="{Binding LogedToProgram}">
					<Button.Styles>
						<Style Selector="Button:pointerover /template/ ContentPresenter">
							<Setter Property="Background" Value="#D8B389"></Setter>
							<Setter Property="Foreground" Value="White"></Setter>
						</Style>
					</Button.Styles>
				</Button>
			</StackPanel>
		</Border>
	</Grid>
</UserControl>

