<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"
             mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="800"
             x:Class="HelloItQuantum.Views.GameCreateFriendView"
			 x:DataType="vm:MainWindowViewModel"
			 xmlns:vm="using:HelloItQuantum.ViewModels">

	<UserControl.Styles>
		<Style Selector="TextBlock">
			<Setter Property="FontFamily" Value="{StaticResource BankGothicMediumRUS}"/>
			<Setter Property="FontSize" Value="26"/>
		</Style>
		<Style Selector="Button">
			<Setter Property="FontFamily" Value="{StaticResource BankGothicMediumRUS}"/>
			<Setter Property="FontSize" Value="26"/>
			<Setter Property="CornerRadius" Value="10"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
		</Style>
		
		<Style Selector="ComboBox">
			<Setter Property="Background" Value="#E6EFD8"/>
			<Setter Property="CornerRadius" Value="10"/>
			<Setter Property="VerticalAlignment" Value="Center"/>
			<Setter Property="BorderBrush" Value="Transparent"/>
		</Style>
	</UserControl.Styles>

		<Panel Background="#006838">
			<Grid ColumnDefinitions="auto, auto" RowDefinitions="*, auto" Margin="10 20" HorizontalAlignment="Center">

				<Grid Grid.Column="0" Grid.Row="0" ColumnDefinitions="60, 200, 20, 140, 20, 300, 40" RowDefinitions="auto, 10, *">

					<Border Grid.Column="1"  Grid.Row="0" CornerRadius="10" Background="#E6EFD8">
						<TextBlock Text="Фигура" VerticalAlignment="Stretch" Margin="10" TextAlignment="Center"/>
					</Border>

					<Border Grid.Column="3" Grid.Row="0" CornerRadius="10" Background="#E6EFD8">
						<TextBlock Text="Цвет" VerticalAlignment="Stretch" Margin="10" TextAlignment="Center"/>
					</Border>

					<Border Grid.Column="5" Grid.Row="0" CornerRadius="10" Background="#E6EFD8">
						<TextBlock Text="Положение" VerticalAlignment="Stretch" Margin="10" TextAlignment="Center"/>
					</Border>
					
					<ScrollViewer Grid.ColumnSpan="7" Grid.Row="2" VerticalAlignment="Top" Margin="0 0 20 0">
						<Grid RowDefinitions="auto, auto">
							
							<ItemsControl Grid.Row="0" ItemsSource="{Binding GameCreateFriendVM.ListElements}">
								<ItemsControl.ItemTemplate>
									<DataTemplate>
										<Grid ColumnDefinitions="40, 20, *, 20" Margin="0 10">
											<Button Grid.Column="0" Background="#F26527" Width="40" Command="{Binding Delete}" VerticalAlignment="Stretch">
												<Svg Path="/Assets/ImgCreateFriend/delete.svg" Width="20"/>
											</Button>
											<Border Grid.Column="2" CornerRadius="10"
													Background="#7CBE41"
													HorizontalAlignment="Stretch"
													Padding="10">
												<StackPanel Orientation="Horizontal">
													<ComboBox ItemsSource="{Binding CbElement}" SelectedIndex="{Binding SelectedElementIndex}"
															  Width="180" Height="125" Margin="0 0 40 0"/>
													<ComboBox ItemsSource="{Binding CbColor}" SelectedIndex="{Binding SelectedColorIndex}"
															  Width="120" Height="125" Margin="0 0 40 0"/>
													<ComboBox ItemsSource="{Binding CbNavigateOne}" SelectedIndex="{Binding SelectedNavigateOne}" IsVisible="{Binding IsVisibleNavigateOne}"
															  Width="130" Height="125" Margin="0 0 10 0"/>
													<ComboBox ItemsSource="{Binding CbNavigateTwo}" SelectedIndex="{Binding SelectedNavigateTwo}" IsVisible="{Binding IsVisibleNavigateTwo}"
															  Width="130" Height="125"/>
												</StackPanel>
											</Border>
										</Grid>
									</DataTemplate>
								</ItemsControl.ItemTemplate>
							</ItemsControl>

							<StackPanel Grid.Row="1" Margin="60 0 20 0" HorizontalAlignment="Stretch">
								<Button Content="+" Command="{Binding GameCreateFriendVM.ClickCreateElement}"
								Background="#E6EFD8" HorizontalAlignment="Stretch"/>
								<Grid ColumnDefinitions="auto, *" HorizontalAlignment="Stretch" Margin="0 10" IsVisible="{Binding GameCreateFriendVM.IsVisibleClue}">
									<Image Grid.Column="0" Source="/Assets/ImgCreateFriend/arrow.png" Width="100" Margin="0 10 10 0"/>
									<Border Grid.Column="1" Background="#E6EFD8" CornerRadius="10" BorderThickness="5" BorderBrush="#F26527" Margin="10 10 0 0" Padding="10">
										<StackPanel HorizontalAlignment="Stretch">
											<TextBlock Text="Привет! Давай создадим друга для компьютерной пыли! Нажми на кнопку, чтобы создать элемент. Выбери цвет фигуры, управляй положением глаз и ног."
											   TextWrapping="Wrap"/>
											<Button Command="{Binding GameCreateFriendVM.PlayTask}" Margin="0 -20 0 0" CornerRadius="10000" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="1">												
													<Image Source="/Assets/ImgCreateFriend/play_audio.png" Width="50"/>
											</Button>
										</StackPanel>
									</Border>						
								</Grid>
							</StackPanel>
						</Grid>
					</ScrollViewer>
					
				</Grid>

				<Panel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" Width="400">
					<Image Source="/Assets/ImgCreateFriend/img_friend.png" Width="400"/>
					<Image Source="/Assets/ImgCreateFriend/hello.png" Width="150" Margin="0 0 140 -100"
						   IsVisible="{Binding GameCreateFriendVM.IsVisibleHello}"/>
					<ContentControl Width="140" Height="180" HorizontalAlignment="Right" VerticalAlignment="Bottom"
						 Margin="0 0 40 40" Content="{Binding GameCreateFriendVM.PChildrens}"/>
				</Panel>

				<Button Grid.ColumnSpan="2" Grid.Row="1"
						Command="{Binding GameCreateFriendVM.ClickCreateFriend}"
						Content="{Binding GameCreateFriendVM.BtnContent}"
						HorizontalAlignment="Stretch"
						Margin="0 30"
						Background="{Binding GameCreateFriendVM.BtnColor}"/>
			</Grid>
			<Button Command="{Binding GameCreateFriendVM.GoBack}" Width="50" Height="50" VerticalAlignment="Top" CornerRadius="10000" Padding="1" Margin="10 20">
				<Image Source="/Assets/КнопкаНазад.png"/>
			</Button>
		</Panel>

	
</UserControl>
