<!--
// /***************************************************************************
// Aaru Data Preservation Suite
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
// Filename       : About.xaml
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// Component      : GUI dialogs.
//
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
//     About 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.About"
        Icon="/Assets/aaru.png"
        CanResize="False"
        x:DataType="dialogs:AboutViewModel"
        Title="{x:Static localization:UI.Title_About_Aaru}">
    <Design.DataContext>
        <dialogs:AboutViewModel />
    </Design.DataContext>
    <Window.Styles>
        <Style Selector="DataGridRow:nth-child(2n)">
            <Setter Property="Background">
                <SolidColorBrush Color="#15FFFFFF" />
            </Setter>
        </Style>
        <Style Selector="DataGridRow:nth-child(2n):pointerover">
            <Setter Property="Background"
                    Value="{DynamicResource SystemControlHighlightListLowBrush}" />
        </Style>
        <Style Selector="DataGridRow:nth-child(2n):selected">
            <Setter Property="Background"
                    Value="{DynamicResource SystemControlHighlightAccentBrush}" />
        </Style>
    </Window.Styles>
    <Grid Margin="12"
          RowSpacing="8"
          RowDefinitions="Auto,*,Auto">
        <Grid Grid.Row="0"
              ColumnDefinitions="Auto,*"
              ColumnSpacing="8">
            <Border Grid.Column="0"
                    BorderThickness="5">
                <Image Source="/Assets/aaru-logo.png"
                       Width="48"
                       Height="48" />
            </Border>
            <Grid Grid.Column="1"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Center"
                  RowDefinitions="Auto,Auto">
                <TextBlock Grid.Row="0"
                           Text="{Binding SoftwareName, Mode=OneWay}"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Center"
                           FontSize="16"
                           FontWeight="Bold" />
                <TextBlock Grid.Row="1"
                           Text="{Binding VersionText, Mode=OneWay}"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Center" />
            </Grid>
        </Grid>
        <TabControl Grid.Row="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
            <TabItem>
                <TabItem.Header>
                    <TextBlock Text="{x:Static localization:UI.Label_About}" />
                </TabItem.Header>
                <Grid RowDefinitions="Auto,12,Auto,12,Auto,Auto,*"
                      RowSpacing="8"
                      Margin="8">
                    <TextBlock Grid.Row="0"
                               Text="{Binding SuiteName, Mode=OneWay}" />
                    <TextBlock Grid.Row="2"
                               Text="{Binding Copyright, Mode=OneWay}" />
                    <Button Grid.Row="4"
                            BorderThickness="0"
                            Background="Transparent"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Padding="0"
                            Command="{Binding WebsiteCommand, Mode=OneWay}">
                        <TextBlock Text="{Binding Website, Mode=OneWay}"
                                   TextDecorations="Underline"
                                   Foreground="{DynamicResource SystemAccentColor}" />
                    </Button>
                    <Button Grid.Row="5"
                            BorderThickness="0"
                            Background="Transparent"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Padding="0"
                            Command="{Binding LicenseCommand, Mode=OneWay}">
                        <TextBlock Text="{x:Static localization:UI.Label_License}"
                                   TextDecorations="Underline"
                                   Foreground="{DynamicResource SystemAccentColor}" />
                    </Button>
                </Grid>
            </TabItem>
            <TabItem>
                <TabItem.Header>
                    <TextBlock Text="{x:Static localization:UI.Label_Libraries}" />
                </TabItem.Header>
                <DataGrid ItemsSource="{Binding Assemblies, Mode=OneWay}"
                          Margin="8"
                          HorizontalScrollBarVisibility="Visible">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Name, Mode=OneWay}"
                                            Width="Auto"
                                            IsReadOnly="True">
                            <DataGridTextColumn.Header>
                                <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Library}" />
                            </DataGridTextColumn.Header>
                        </DataGridTextColumn>
                        <DataGridTextColumn Binding="{Binding Version, Mode=OneWay}"
                                            Width="Auto"
                                            IsReadOnly="True">
                            <DataGridTextColumn.Header>
                                <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Version}" />
                            </DataGridTextColumn.Header>
                        </DataGridTextColumn>
                    </DataGrid.Columns>
                </DataGrid>
            </TabItem>
            <TabItem>
                <TabItem.Header>
                    <TextBlock Text="{x:Static localization:UI.Label_Authors}" />
                </TabItem.Header>
                <Border Margin="8"
                        BorderThickness="1"
                        BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
                        CornerRadius="8">
                    <ScrollViewer Padding="8">
                        <controls:SpectreTextBlock TextWrapping="Wrap"
                                                   Text="{x:Static localization:UI.Text_Authors}" />
                    </ScrollViewer>
                </Border>
            </TabItem>
        </TabControl>
        <Button Grid.Row="2"
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                Command="{Binding CloseCommand, Mode=OneWay}">
            <TextBlock Text="{x:Static localization:UI.ButtonLabel_Close}" />
        </Button>
    </Grid>
</Window>