<!--
// /***************************************************************************
// Aaru Data Preservation Suite
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
// Filename       : Encodings.xaml
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// Component      : GUI dialogs.
//
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
//     Encodings list dialog.
//
// ‐‐[ 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 © 2011-2026 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:dialogs="clr-namespace:Aaru.Gui.ViewModels.Dialogs"
        xmlns:controls="clr-namespace:Aaru.Gui.Controls"
        xmlns:localization="clr-namespace:Aaru.Localization;assembly=Aaru.Localization"
        mc:Ignorable="d"
        d:DesignWidth="800"
        d:DesignHeight="450"
        Width="480"
        Height="320"
        x:Class="Aaru.Gui.Views.Dialogs.Encodings"
        Icon="/Assets/aaru.png"
        CanResize="False"
        x:DataType="dialogs:EncodingsViewModel"
        Title="{x:Static localization:UI.Encodings}">
    <Design.DataContext>
        <dialogs:EncodingsViewModel />
    </Design.DataContext>
    <Grid Margin="12"
          HorizontalAlignment="Stretch"
          VerticalAlignment="Stretch"
          RowDefinitions="*,Auto"
          RowSpacing="8">
        <DataGrid Grid.Row="0"
                  ItemsSource="{Binding Encodings, Mode=OneWay}"
                  HorizontalScrollBarVisibility="Visible">
            <DataGrid.Columns>
                <DataGridTemplateColumn Width="Auto">
                    <DataGridTemplateColumn.HeaderTemplate>
                        <DataTemplate>
                            <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Code_for_encoding}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.HeaderTemplate>
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Name, Mode=OneWay}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Width="Auto">
                    <DataGridTemplateColumn.HeaderTemplate>
                        <DataTemplate>
                            <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Name}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.HeaderTemplate>
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding DisplayName, Mode=OneWay}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
        <Button Grid.Row="1"
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Command="{Binding CloseCommand, Mode=OneWay}">
            <TextBlock Text="{x:Static localization:UI.ButtonLabel_Close}" />
        </Button>
    </Grid>
</Window>