<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:pages="clr-namespace:DHT.Desktop.Main.Pages"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="DHT.Desktop.Main.Pages.DatabasePage">

    <Design.DataContext>
        <pages:DatabasePageModel />
    </Design.DataContext>

    <UserControl.Styles>
        <Style Selector="WrapPanel > Button">
            <Setter Property="Margin" Value="0 0 10 10" />
        </Style>
    </UserControl.Styles>

    <StackPanel Spacing="10">
        <DockPanel>
            <Button Command="{Binding CloseDatabase}" DockPanel.Dock="Right">Close Database</Button>
            <TextBox Text="{Binding Db.Path}" Width="NaN" Margin="0 0 10 0" IsReadOnly="True" />
        </DockPanel>
        <WrapPanel>
            <Button Command="{Binding OpenDatabaseFolder}">Open Database Folder</Button>
            <Button Command="{Binding MergeWithDatabase}">Merge with Database(s)...</Button>
        </WrapPanel>
    </StackPanel>

</UserControl>
