<!--
// /***************************************************************************
// RomRepoMgr - ROM repository manager
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// ‐‐[ License ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
//     This program is free software: you can redistribute it and/or modify
//     it under the terms of the GNU General public License as
//     published by the Free Software Foundation, either version 3 of the
//     License, or (at your option) any later version.
//
//     This program is distributed in the hope that it will be useful,
//     but WITHOUT ANY WARRANTY; without even the implied warranty of
//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//     GNU General public License for more details.
//
//     You should have received a copy of the GNU General public License
//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
// Copyright © 2020-2024 Natalia Portillo
// ****************************************************************************/
-->
<Window 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:vm="clr-namespace:RomRepoMgr.ViewModels;assembly=RomRepoMgr"
        xmlns:resources="clr-namespace:RomRepoMgr.Resources"
        mc:Ignorable="d"
        Width="720"
        Height="500"
        x:Class="RomRepoMgr.Views.EditDat"
        Icon="/Assets/avalonia-logo.ico"
        CanResize="False"
        Title="{x:Static resources:Localization.EditDatTitle}"
        WindowStartupLocation="CenterScreen">
    <Design.DataContext>
        <vm:EditDatViewModel />
    </Design.DataContext>
    <Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto"
          Margin="16"
          RowSpacing="8">
        <Grid Grid.Row="0"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.RomSetNameLabel}"
                       FontWeight="Bold" />
            <TextBox Grid.Column="1"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Center"
                     Text="{Binding Name, Mode=TwoWay}" />
        </Grid>
        <Grid Grid.Row="1"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.RomSetVersionLabel}"
                       FontWeight="Bold" />
            <TextBox Grid.Column="1"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Center"
                     Text="{Binding Version, Mode=TwoWay}" />
        </Grid>
        <Grid Grid.Row="2"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.RomSetAuthorLabel}"
                       FontWeight="Bold" />
            <TextBox Grid.Column="1"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Center"
                     Text="{Binding Author, Mode=TwoWay}" />
        </Grid>
        <Grid Grid.Row="3"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.RomSetCategoryLabel}"
                       FontWeight="Bold" />
            <TextBox Grid.Column="1"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Center"
                     Text="{Binding Category, Mode=TwoWay}" />
        </Grid>
        <Grid Grid.Row="4"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.RomSetCommentLabel}"
                       FontWeight="Bold" />
            <TextBox Grid.Column="1"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Center"
                     Text="{Binding Comment, Mode=TwoWay}" />
        </Grid>
        <Grid Grid.Row="5"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.RomSetDateLabel}"
                       FontWeight="Bold" />
            <TextBox Grid.Column="1"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Center"
                     Text="{Binding Date, Mode=TwoWay}" />
        </Grid>
        <Grid Grid.Row="6"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.RomSetDescriptionLabel}"
                       FontWeight="Bold" />
            <TextBox Grid.Column="1"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Center"
                     Text="{Binding Description, Mode=TwoWay}" />
        </Grid>
        <Grid Grid.Row="7"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.HomepageLabel}"
                       FontWeight="Bold" />
            <TextBox Grid.Column="1"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Center"
                     Text="{Binding Homepage, Mode=TwoWay}" />
        </Grid>
        <Grid Grid.Row="8"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.TotalMachinesLabel}"
                       FontWeight="Bold" />
            <TextBlock Grid.Column="1"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Center"
                       Text="{Binding TotalMachines, Mode=OneWay}" />
        </Grid>
        <Grid Grid.Row="9"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.CompleteMachinesLabel}"
                       FontWeight="Bold" />
            <TextBlock Grid.Column="1"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Center"
                       Text="{Binding CompleteMachines, Mode=OneWay}" />
        </Grid>
        <Grid Grid.Row="10"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.IncompleteMachinesLabel}"
                       FontWeight="Bold" />
            <TextBlock Grid.Column="1"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Center"
                       Text="{Binding IncompleteMachines, Mode=OneWay}" />
        </Grid>
        <Grid Grid.Row="11"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.TotalRomsLabel}"
                       FontWeight="Bold" />
            <TextBlock Grid.Column="1"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Center"
                       Text="{Binding TotalRoms, Mode=OneWay}" />
        </Grid>
        <Grid Grid.Row="12"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.HaveRomsLabel}"
                       FontWeight="Bold" />
            <TextBlock Grid.Column="1"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Center"
                       Text="{Binding HaveRoms, Mode=OneWay}" />
        </Grid>
        <Grid Grid.Row="13"
              ColumnSpacing="8"
              ColumnDefinitions="140,*">
            <TextBlock Grid.Column="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Text="{x:Static resources:Localization.MissRomsLabel}"
                       FontWeight="Bold" />
            <TextBlock Grid.Column="1"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Center"
                       Text="{Binding MissRoms, Mode=OneWay}" />
        </Grid>
        <StackPanel Grid.Row="14"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right">
            <Button HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Command="{Binding SaveCommand, Mode=OneWay}"
                    IsVisible="{Binding Modified, Mode=OneWay}">
                <TextBlock Text="{x:Static resources:Localization.SaveLabel}" />
            </Button>
            <Button HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Command="{Binding CancelCommand, Mode=OneWay}"
                    IsVisible="{Binding Modified, Mode=OneWay}">
                <TextBlock Text="{x:Static resources:Localization.CancelLabel}" />
            </Button>
            <Button HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Command="{Binding CloseCommand, Mode=OneWay}"
                    IsVisible="{Binding !Modified, Mode=OneWay}">
                <TextBlock Text="{x:Static resources:Localization.CloseLabel}" />
            </Button>
        </StackPanel>
    </Grid>
</Window>