<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="800" d:DesignHeight="450"
             x:Class="TourAgent.Views.Hotels"
			 xmlns:vm="using:TourAgent.ViewModels"
			 x:DataType="vm:MainWindowViewModel"
			 Background="#878787">
	<Grid>
		<ListBox ItemsSource="{Binding HotelsVM.Hotels}" Grid.Row="1" Background="#878787">
			<ListBox.ItemsPanel>
				<ItemsPanelTemplate>
					<WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
				</ItemsPanelTemplate>
			</ListBox.ItemsPanel>
			<ListBox.ItemTemplate>
				<DataTemplate>
					<Border HorizontalAlignment="Center" BorderBrush="Black" Background="#bae3e8" BorderThickness="1" Padding="15">
						<Grid HorizontalAlignment="Center">
							<StackPanel Width="800" Orientation="Horizontal" HorizontalAlignment="Center">
								<Grid Width="800" ColumnDefinitions="*,*,*,*,1*">
									<TextBlock Grid.Column="0" Text="{Binding Name}"/>
									<TextBlock Grid.Column="1" Margin="20,0,0,0" Text="{Binding CountOfStars}"/>
									<TextBlock Grid.Column="2" Margin="0,0,0,0" Text="{Binding CountryName}"/>
									<TextBlock Grid.Column="3" Margin="0,0,0,0" Text="{Binding AmountTours}"/>
									<StackPanel Grid.Column="4" HorizontalAlignment="Center">
										<Button Width="130" HorizontalContentAlignment="Left" Content="Редактировать"/>
										<Button Width="130" HorizontalContentAlignment="Left" Content="Удалить"/>
									</StackPanel>
								</Grid>
							</StackPanel>
						</Grid>
					</Border>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
		<StackPanel Margin="10,0,0,10" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Row="1">
			<Button IsEnabled="{Binding HotelsVM.EnableOrNotLeft}" Command="{Binding HotelsVM.ToFirstPage}" FontSize="15" Content="В начало"/>
			<Button IsEnabled="{Binding HotelsVM.EnableOrNotLeft}" Command="{Binding HotelsVM.PrevPage}" Margin="10,0,0,0" FontSize="15" Content="Лево"/>
		</StackPanel>
		<StackPanel Margin="0,0,10,10" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="1">
			<Button IsEnabled="{Binding HotelsVM.EnableOrNotRight}" Command="{Binding HotelsVM.NextPage}" Margin="0,0,10,0" FontSize="15" Content="Право"/>
			<Button IsEnabled="{Binding HotelsVM.EnableOrNotRight}" Command="{Binding HotelsVM.ToLastPage}" FontSize="15" Content="В конец"/>
		</StackPanel>
		<StackPanel Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Left" >
			<TextBlock FontSize="25" Text="{Binding HotelsVM.Page}"/>
		</StackPanel>
	</Grid>
</UserControl>
