<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:avaloniaEdit="https://github.com/avaloniaui/avaloniaedit"
			 xmlns:ui="using:FluentAvalonia.UI.Controls"             
             xmlns:uip="using:FluentAvalonia.UI.Controls.Primitives"
			 xmlns:vm="using:Needlework.Net.ViewModels.Pages"
			 xmlns:controls="using:Needlework.Net.Controls"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Needlework.Net.Views.Pages.ConsoleView"
			 x:DataType="vm:ConsoleViewModel">
	<controls:BusyArea IsBusy="{Binding IsBusy}"
					   BusyText="Loading...">
		<Grid Margin="16" RowDefinitions="auto,*" ColumnDefinitions="*,*">
			<Grid Grid.Row="0"
				  Grid.Column="0"
				  Grid.ColumnSpan="2">
				<StackPanel Margin="0 0 0 16">
					<Grid RowDefinitions="auto" ColumnDefinitions="auto,*,auto">
						<ComboBox ItemsSource="{Binding RequestMethods}"
								  SelectedItem="{Binding RequestMethodSelected}"
								  Margin="0 0 8 0"
								  Grid.Row="0"
								  Grid.Column="0"/>
						<AutoCompleteBox
								 ItemsSource="{Binding RequestPaths}"
								 Text="{Binding RequestPath}"
								 MaxDropDownHeight="400"
								 FilterMode="StartsWith"
								 Grid.Row="0"
								 Grid.Column="1"/>
						<Button Margin="8 0 0 0"
								HorizontalAlignment="Center"
								VerticalAlignment="Bottom"
								FontWeight="DemiBold"
								Grid.Row="0"
								Grid.Column="2"
								Command="{Binding SendRequestCommand}">
							Send
						</Button>
					</Grid>
				</StackPanel>
			</Grid>
			<Grid Grid.Row="1"
				  Grid.Column="0"
				  RowDefinitions="auto,*"
				  ColumnDefinitions="*">
				<TextBox IsReadOnly="True"
						 Grid.Row="0"
						 Grid.Column="0"
						 Text="{Binding ResponsePath}"/>
				<avaloniaEdit:TextEditor
								 Name="RequestEditor"
								 Text=""
								 ShowLineNumbers="True"
								 HorizontalScrollBarVisibility="Auto"
								 VerticalScrollBarVisibility="Visible"
								 Margin="0 8 0 0"
								 FontSize="12"
								 Grid.Row="1"
								 Grid.Column="0"/>
			</Grid>
			<Grid	RowDefinitions="35,*"
					ColumnDefinitions="*"
					Margin="8 0 0 0"
					Grid.Row="1"
					Grid.Column="1">
				<StackPanel Orientation="Horizontal"
							Grid.Row="0"
							Grid.Column="0">
					<Button Content="{Binding ResponseStatus}"
							FontSize="12"
							VerticalAlignment="Center"/>
				</StackPanel>
				<avaloniaEdit:TextEditor
									   Grid.Row="1"
									   Grid.Column="0"
									   Name="ResponseEditor"
									   HorizontalScrollBarVisibility="Auto"
									   VerticalScrollBarVisibility="Visible"
									   ShowLineNumbers="True"
									   IsReadOnly="True"
									   Text=""
									   FontSize="12"/>
			</Grid>
		</Grid>
	</controls:BusyArea>
</UserControl>
