<!--
// /***************************************************************************
// Aaru Data Preservation Suite
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
// Filename       : ImageInfo.xaml
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// Component      : GUI panel.
//
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
//     Image information panel.
//
// ‐‐[ 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
// ****************************************************************************/
-->
<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:panels="clr-namespace:Aaru.Gui.ViewModels.Panels"
             mc:Ignorable="d"
             d:DesignWidth="800"
             d:DesignHeight="450"
             x:Class="Aaru.Gui.Views.Panels.ImageInfo">
    <Design.DataContext>
        <panels:ImageInfoViewModel />
    </Design.DataContext>
    <StackPanel>
        <Image Width="128"
               Height="128"
               HorizontalAlignment="Center"
               VerticalAlignment="Center"
               Source="{Binding MediaLogo}" />
        <TextBlock Text="{Binding ImageInformationLabel}"
                   FontWeight="Bold" />
        <TextBlock Text="{Binding ImagePathText}" /> <TextBlock Text="{Binding FilterText}" />
        <TextBlock Text="{Binding ImageIdentifiedText}" />
        <TabControl>
            <TabItem>
                <TabItem.Header>
                    <TextBlock Text="{Binding GeneralLabel}" />
                </TabItem.Header>
                <StackPanel>
                    <TextBlock Text="{Binding ImageFormatText}"
                               IsVisible="{Binding !!ImageFormatText}" />
                    <TextBlock Text="{Binding ApplicationText}"
                               IsVisible="{Binding !!ApplicationText}" />
                    <TextBlock Text="{Binding ImageSizeText}"
                               IsVisible="{Binding !!ImageSizeText}" />
                    <TextBlock Text="{Binding SectorsText}"
                               IsVisible="{Binding !!SectorsText}" />
                    <TextBlock Text="{Binding CreatorText}"
                               IsVisible="{Binding !!CreatorText}" />
                    <TextBlock Text="{Binding CreationTimeText}"
                               IsVisible="{Binding !!CreationTimeText}" />
                    <TextBlock Text="{Binding LastModificationTimeText}"
                               IsVisible="{Binding !!LastModificationTimeText}" />
                    <TextBlock Text="{Binding MediaTypeText}"
                               IsVisible="{Binding !!MediaTypeText}" />
                    <TextBlock Text="{Binding HasPartitionsText}"
                               IsVisible="{Binding !!HasPartitionsText}" />
                    <TextBlock Text="{Binding HasSessionsText}"
                               IsVisible="{Binding !!HasSessionsText}" />
                    <TextBlock Text="{Binding CommentsLabel}"
                               IsVisible="{Binding !!CommentsText}"
                               FontWeight="Bold" />
                    <TextBox IsReadOnly="True"
                             TextWrapping="Wrap"
                             Text="{Binding CommentsText}"
                             IsVisible="{Binding !!CommentsText}" />
                    <TextBlock Text="{Binding MediaInformationLabel}"
                               FontWeight="Bold"
                               IsVisible="{Binding MediaInformationVisible}" />
                    <TextBlock Text="{Binding MediaSequenceText}"
                               IsVisible="{Binding !!MediaSequenceText}" />
                    <TextBlock Text="{Binding MediaTitleText}"
                               IsVisible="{Binding !!MediaTitleText}" />
                    <TextBlock Text="{Binding MediaManufacturerText}"
                               IsVisible="{Binding !!MediaManufacturerText}" />
                    <TextBlock Text="{Binding MediaModelText}"
                               IsVisible="{Binding !!MediaModelText}" />
                    <TextBlock Text="{Binding MediaSerialNumberText}"
                               IsVisible="{Binding !!MediaSerialNumberText}" />
                    <TextBlock Text="{Binding MediaBarcodeText}"
                               IsVisible="{Binding !!MediaBarcodeText}" />
                    <TextBlock Text="{Binding MediaPartNumberText}"
                               IsVisible="{Binding !!MediaPartNumberText}" />
                    <TextBlock Text="{Binding DriveInformationLabel}"
                               FontWeight="Bold"
                               IsVisible="{Binding DriveInformationVisible}" />
                    <TextBlock Text="{Binding DriveManufacturerText}"
                               IsVisible="{Binding !!DriveManufacturerText}" />
                    <TextBlock Text="{Binding DriveModelText}"
                               IsVisible="{Binding !!DriveModelText}" />
                    <TextBlock Text="{Binding DriveSerialNumberText}"
                               IsVisible="{Binding !!DriveSerialNumberText}" />
                    <TextBlock Text="{Binding DriveFirmwareRevisionText}"
                               IsVisible="{Binding !!DriveFirmwareRevisionText}" />
                    <TextBlock Text="{Binding MediaGeometryText}"
                               IsVisible="{Binding !!MediaGeometryText}" />
                    <TextBlock Text="{Binding ReadableMediaTagsLabel}"
                               FontWeight="Bold"
                               IsVisible="{Binding !!MediaTagsList.Count}" />
                    <DataGrid ItemsSource="{Binding MediaTagsList}"
                              IsVisible="{Binding !!MediaTagsList.Count}"
                              IsReadOnly="True">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="{Binding TagLabel}"
                                                Binding="{Binding .}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                        </DataGrid.Columns>
                    </DataGrid>
                    <TextBlock Text="{Binding ReadableSectorTagsLabel}"
                               FontWeight="Bold"
                               IsVisible="{Binding !!SectorTagsList.Count}" />
                    <DataGrid ItemsSource="{Binding SectorTagsList}"
                              IsVisible="{Binding !!SectorTagsList.Count}"
                              IsReadOnly="True">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="{Binding TagLabel}"
                                                Binding="{Binding .}"
                                                Width="Auto"
                                                IsReadOnly="True" />
                        </DataGrid.Columns>
                    </DataGrid>
                </StackPanel>
            </TabItem>
            <TabItem IsVisible="{Binding !!Sessions.Count}">
                <TabItem.Header>
                    <TextBlock Text="{Binding SessionsLabel}" />
                </TabItem.Header>
                <DataGrid ItemsSource="{Binding Sessions}"
                          IsVisible="{Binding !!Sessions.Count}"
                          IsReadOnly="True">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="{Binding SessionLabel}"
                                            Binding="{Binding SessionSequence}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding FirstTrackLabel}"
                                            Binding="{Binding StartTrack}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding LastTrackLabel}"
                                            Binding="{Binding EndTrack}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding StartLabel}"
                                            Binding="{Binding StartSector}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding EndLabel}"
                                            Binding="{Binding EndSector}"
                                            Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid>
            </TabItem>
            <TabItem IsVisible="{Binding !!Tracks.Count}">
                <TabItem.Header>
                    <TextBlock Text="{Binding TracksLabel}" />
                </TabItem.Header>
                <DataGrid ItemsSource="{Binding Tracks}"
                          IsVisible="{Binding !!Tracks.Count}"
                          IsReadOnly="True">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="{Binding TrackLabel}"
                                            Binding="{Binding Sequence}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding TypeLabel}"
                                            Binding="{Binding Type}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding BpsLabel}"
                                            Binding="{Binding BytesPerSector}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding RawBpsLabel}"
                                            Binding="{Binding RawBytesPerSector}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding SubchannelLabel}"
                                            Binding="{Binding SubchannelType}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding PregapLabel}"
                                            Binding="{Binding Pregap}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding StartLabel}"
                                            Binding="{Binding StartSector}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding EndLabel}"
                                            Binding="{Binding EndSector}"
                                            Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid>
            </TabItem>
            <TabItem IsVisible="{Binding !!DumpHardwareList.Count}">
                <TabItem.Header>
                    <TextBlock Text="{Binding DumpHardwareLabel}" />
                </TabItem.Header>
                <DataGrid ItemsSource="{Binding DumpHardwareList}"
                          IsVisible="{Binding !!DumpHardwareList.Count}"
                          IsReadOnly="True">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="{Binding ManufacturerLabel}"
                                            Binding="{Binding Manufacturer}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding ModelLabel}"
                                            Binding="{Binding Model}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding RevisionLabel}"
                                            Binding="{Binding Revision}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding SerialLabel}"
                                            Binding="{Binding Serial}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding SoftwareLabel}"
                                            Binding="{Binding SoftwareName}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding VersionLabel}"
                                            Binding="{Binding SoftwareVersion}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding OperatingSystemLabel}"
                                            Binding="{Binding OperatingSystem}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding StartLabel}"
                                            Binding="{Binding TrackStartSector}"
                                            Width="Auto" />
                        <DataGridTextColumn Header="{Binding EndLabel}"
                                            Binding="{Binding TrackEndSector}"
                                            Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid>
            </TabItem>
            <TabItem IsVisible="{Binding !!ScsiInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding SCSILabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding ScsiInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!AtaInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding ATA_ATAPILabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding AtaInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!CompactDiscInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding CompactDiscLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding CompactDiscInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!DvdInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding Dvd_Hd_DvdLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding DvdInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!DvdWritableInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding Dvd_R_WLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding DvdWritableInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!BlurayInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding BluRayLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding BlurayInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!PcmciaInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding PcmciaLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding PcmciaInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!SdMmcInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding Sd_MMCLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding SdMmcInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!XboxInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding XboxLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding XboxInfo}" />
            </TabItem>
        </TabControl>
        <StackPanel Orientation="Horizontal"
                    Spacing="5">
            <Button Command="{Binding EntropyCommand}">
                <TextBlock Text="{Binding EntropyLabel}" />
            </Button>
            <Button Command="{Binding VerifyCommand}">
                <TextBlock Text="{Binding VerifyLabel}" />
            </Button>
            <Button Command="{Binding ChecksumCommand}">
                <TextBlock Text="{Binding ChecksumLabel}" />
            </Button>
            <Button Command="{Binding ConvertCommand}">
                <TextBlock Text="{Binding ConvertLabel}" />
            </Button>
            <Button Command="{Binding CreateSidecarCommand}">
                <TextBlock Text="{Binding CreateSidecarLabel}" />
            </Button>
            <Button Command="{Binding ViewSectorsCommand}">
                <TextBlock Text="{Binding ViewSectorsLabel}" />
            </Button>
            <Button Command="{Binding DecodeMediaTagCommand}">
                <TextBlock Text="{Binding DecodeMediaTagLabel}" />
            </Button>
        </StackPanel>
    </StackPanel>
</UserControl>