<UserControl x:Class="DatabaseEditor.Views.CreateDatabaseDialogView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:DatabaseEditor.Views"
             DataContext="{Binding Source={StaticResource ViewModelLocator}, Path=CreateDatabaseViewModel}"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="2*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Database was not found. Do you want to create one?</TextBlock>
        
        <Grid Grid.Row="1" HorizontalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <TextBlock Grid.Row="0" Grid.Column="0" Text="Number of authors:"/>
            <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding AuthorsCount, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}" MinWidth="100"/>

            <TextBlock Grid.Row="1" Grid.Column="0" Text="Number of books:"/>
            <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding BooksCount, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}" MinWidth="100"/>

            <TextBlock Grid.Row="2" Grid.Column="0" Text="Minimum number of books by one author:"/>
            <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding MinAuthorsBooks, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}" MinWidth="100"/>

            <TextBlock Grid.Row="3" Grid.Column="0" Text="Maximum number of books by one author:"/>
            <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding MaxAuthorsBooks, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}" MinWidth="100"/>

        </Grid>

        <Grid Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Button Grid.Column="1" Content="No" IsCancel="True" Command="{Binding CancelCommand}" />
            <Button Grid.Column="2" Content="Yes" IsDefault="True" Command="{Binding ConfirmCommand}" />
        </Grid>
    </Grid>
</UserControl>