<!--
// /***************************************************************************
// Aaru Data Preservation Suite
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
// Filename       : StatisticsDialog.xaml
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// Component      : GUI dialogs.
//
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
//     Statistics 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-2025 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"
        mc:Ignorable="d"
        d:DesignWidth="800"
        d:DesignHeight="450"
        Width="550"
        Height="320"
        x:Class="Aaru.Gui.Views.Dialogs.StatisticsDialog"
        Icon="/Assets/aaru-logo.png"
        CanResize="False"
        Title="{Binding Title}">
    <Design.DataContext>
        <dialogs:StatisticsViewModel />
    </Design.DataContext>
    <Border Padding="15">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" /> <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TabControl Grid.Row="0"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch">
                <TabItem IsVisible="{Binding CommandsVisible}">
                    <TabItem.Header>
                        <TextBlock Text="{Binding CommandsLabel}" />
                    </TabItem.Header>
                    <StackPanel VerticalAlignment="Top"
                                HorizontalAlignment="Stretch">
                        <TextBlock Text="{Binding FsInfoText}"
                                   IsVisible="{Binding FsInfoVisible}" />
                        <TextBlock Text="{Binding ChecksumText}"
                                   IsVisible="{Binding ChecksumVisible}" />
                        <TextBlock Text="{Binding CompareText}"
                                   IsVisible="{Binding CompareVisible}" />
                        <TextBlock Text="{Binding ConvertImageText}"
                                   IsVisible="{Binding ConvertImageVisible}" />
                        <TextBlock Text="{Binding CreateSidecarText}"
                                   IsVisible="{Binding CreateSidecarVisible}" />
                        <TextBlock Text="{Binding DecodeText}"
                                   IsVisible="{Binding DecodeVisible}" />
                        <TextBlock Text="{Binding DeviceInfoText}"
                                   IsVisible="{Binding DeviceInfoVisible}" />
                        <TextBlock Text="{Binding DeviceReportText}"
                                   IsVisible="{Binding DeviceReportVisible}" />
                        <TextBlock Text="{Binding DumpMediaText}"
                                   IsVisible="{Binding DumpMediaVisible}" />
                        <TextBlock Text="{Binding EntropyText}"
                                   IsVisible="{Binding EntropyVisible}" />
                        <TextBlock Text="{Binding FormatsCommandText}"
                                   IsVisible="{Binding FormatsCommandVisible}" />
                        <TextBlock Text="{Binding ImageInfoText}"
                                   IsVisible="{Binding ImageInfoVisible}" />
                        <TextBlock Text="{Binding MediaInfoText}"
                                   IsVisible="{Binding MediaInfoVisible}" />
                        <TextBlock Text="{Binding MediaScanText}"
                                   IsVisible="{Binding MediaScanVisible}" />
                        <TextBlock Text="{Binding PrintHexText}"
                                   IsVisible="{Binding PrintHexVisible}" />
                        <TextBlock Text="{Binding VerifyText}"
                                   IsVisible="{Binding VerifyVisible}" />
                    </StackPanel>
                </TabItem>
                <TabItem IsVisible="{Binding FiltersVisible}">
                    <TabItem.Header>
                        <TextBlock Text="{Binding FiltersLabel}" />
                    </TabItem.Header>
                    <DataGrid ItemsSource="{Binding Filters}"
                              HorizontalScrollBarVisibility="Visible">
                        <DataGrid.Columns>
                            <!-- TODO: Bind header -->
                            <DataGridTextColumn Header="{Binding FilterLabel}"
                                                Binding="{Binding Name}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding TimesFoundLabel}"
                                                Binding="{Binding Count}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
                <TabItem IsVisible="{Binding FormatsVisible}">
                    <TabItem.Header>
                        <TextBlock Text="{Binding FormatsLabel}" />
                    </TabItem.Header>
                    <DataGrid ItemsSource="{Binding Formats}"
                              HorizontalScrollBarVisibility="Visible">
                        <DataGrid.Columns>
                            <!-- TODO: Bind header -->
                            <DataGridTextColumn Header="{Binding FormatLabel}"
                                                Binding="{Binding Name}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding TimesFoundLabel}"
                                                Binding="{Binding Count}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
                <TabItem IsVisible="{Binding PartitionsVisible}">
                    <TabItem.Header>
                        <TextBlock Text="{Binding PartitionsLabel}" />
                    </TabItem.Header>
                    <DataGrid ItemsSource="{Binding Partitions}"
                              HorizontalScrollBarVisibility="Visible">
                        <DataGrid.Columns>
                            <!-- TODO: Bind header -->
                            <DataGridTextColumn Header="{Binding PartitionLabel}"
                                                Binding="{Binding Name}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding TimesFoundLabel}"
                                                Binding="{Binding Count}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
                <TabItem IsVisible="{Binding FilesystemsVisible}">
                    <TabItem.Header>
                        <TextBlock Text="{Binding FilesystemsLabel}" />
                    </TabItem.Header>
                    <DataGrid ItemsSource="{Binding Filesystems}"
                              HorizontalScrollBarVisibility="Visible">
                        <DataGrid.Columns>
                            <!-- TODO: Bind header -->
                            <DataGridTextColumn Header="{Binding FilesystemLabel}"
                                                Binding="{Binding Name}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding TimesFoundLabel}"
                                                Binding="{Binding Count}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
                <TabItem IsVisible="{Binding DevicesVisible}">
                    <TabItem.Header>
                        <TextBlock Text="{Binding DevicesLabel}" />
                    </TabItem.Header>
                    <DataGrid ItemsSource="{Binding Devices}"
                              HorizontalScrollBarVisibility="Visible">
                        <DataGrid.Columns>
                            <!-- TODO: Bind header -->
                            <DataGridTextColumn Header="{Binding DeviceLabel}"
                                                Binding="{Binding Model}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding ManufacturerLabel}"
                                                Binding="{Binding Manufacturer}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding RevisionLabel}"
                                                Binding="{Binding Revision}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding BusLabel}"
                                                Binding="{Binding Bus}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
                <TabItem IsVisible="{Binding MediasVisible}">
                    <TabItem.Header>
                        <TextBlock Text="{Binding MediasLabel}" />
                    </TabItem.Header>
                    <DataGrid ItemsSource="{Binding Medias}"
                              HorizontalScrollBarVisibility="Visible">
                        <DataGrid.Columns>
                            <!-- TODO: Bind header -->
                            <DataGridTextColumn Header="{Binding MediaLabel}"
                                                Binding="{Binding Name}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding TimesFoundLabel}"
                                                Binding="{Binding Count}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                            <DataGridTextColumn Header="{Binding TypeLabel}"
                                                Binding="{Binding Type}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
            </TabControl>
            <Button Grid.Row="1"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Command="{Binding CloseCommand}"
                    Padding="10">
                <TextBlock Text="{Binding CloseLabel}" />
            </Button>
        </Grid>
    </Border>
</Window>