<!--
// /***************************************************************************
// Aaru Data Preservation Suite
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
// Filename       : DeviceInfo.xaml
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// Component      : GUI panel.
//
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
//     Device 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.DeviceInfo">
    <Design.DataContext>
        <panels:DeviceInfoViewModel />
    </Design.DataContext>
    <StackPanel Orientation="Vertical">
        <TextBlock Text="{Binding DeviceInformationLabel}" />
        <TabControl>
            <TabItem>
                <TabItem.Header>
                    <TextBlock Text="{Binding GeneralLabel}" />
                </TabItem.Header>
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding DeviceTypeLabel}" />
                        <TextBox Text="{Binding DeviceType}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ManufacturerLabel}" />
                        <TextBox Text="{Binding Manufacturer}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ModelLabel}" />
                        <TextBox Text="{Binding Model}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding RevisionLabel}" />
                        <TextBox Text="{Binding Revision}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding SerialNumberLabel}" />
                        <TextBox Text="{Binding Serial}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ScsiTypeLabel}" />
                        <TextBox Text="{Binding ScsiType}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <CheckBox IsChecked="{Binding RemovableChecked}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding RemovableMediaLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding UsbConnected}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding UsbConnectedLabel}" />
                    </CheckBox>
                </StackPanel>
            </TabItem>
            <TabItem IsVisible="{Binding UsbVisible}">
                <TabItem.Header>
                    <TextBlock Text="{Binding UsbLabel}" />
                </TabItem.Header>
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding VendorIDLabel}" />
                        <TextBox Text="{Binding UsbVendorId}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ProductIDLabel}" />
                        <TextBox Text="{Binding UsbProductId}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ManufacturerLabel}" />
                        <TextBox Text="{Binding UsbManufacturer}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ProductLabel}" />
                        <TextBox Text="{Binding UsbProduct}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding SerialNumberLabel}" />
                        <TextBox Text="{Binding UsbSerial}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <Button Command="{Binding SaveUsbDescriptorsCommand}"
                            IsVisible="{Binding SaveUsbDescriptorsEnabled}">
                        <TextBlock Text="{Binding SaveUsbDescriptorsLabel}" />
                    </Button>
                </StackPanel>
            </TabItem>
            <TabItem IsVisible="{Binding FirewireVisible}">
                <TabItem.Header>
                    <TextBlock Text="{Binding FireWireLabel}" />
                </TabItem.Header>
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding VendorIDLabel}" />
                        <TextBox Text="{Binding FirewireVendorId}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ModelIDLabel}" />
                        <TextBox Text="{Binding FirewireModelId}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ManufacturerLabel}" />
                        <TextBox Text="{Binding FirewireManufacturer}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding ModelLabel}" />
                        <TextBox Text="{Binding FirewireModel}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding GuidLabel}" />
                        <TextBox Text="{Binding FirewireGuid}"
                                 IsReadOnly="True" />
                    </StackPanel>
                </StackPanel>
            </TabItem>
            <TabItem IsVisible="{Binding PlextorVisible}">
                <TabItem.Header>
                    <TextBlock Text="{Binding PlextorLabel}" />
                </TabItem.Header>
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Vertical"
                                IsVisible="{Binding PlextorEepromVisible}">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding PlextorDiscsLabel}" />
                            <TextBox Text="{Binding PlextorDiscs}"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding PlextorCdReadTimeLabel}" />
                            <TextBox Text="{Binding PlextorCdReadTime}"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding PlextorCdWriteTimeLabel}" />
                            <TextBox Text="{Binding PlextorCdWriteTime}"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Orientation="Vertical"
                                    IsVisible="{Binding PlextorDvdTimesVisible}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding PlextorDvdReadTimeLabel}" />
                                <TextBox Text="{Binding PlextorDvdReadTime}"
                                         IsReadOnly="True" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding PlextorDvdWriteTimeLabel}" />
                                <TextBox Text="{Binding PlextorDvdWriteTime}"
                                         IsReadOnly="True" />
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                    <CheckBox IsChecked="{Binding PlextorPoweRec}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding PlextorPoweRecLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding PlextorPoweRecEnabled}"
                              IsEnabled="False"
                              IsVisible="{Binding PlextorPoweRec}">
                        <TextBlock Text="{Binding PlextorPoweRecEnabledLabel}" />
                    </CheckBox>
                    <StackPanel Orientation="Vertical"
                                IsVisible="{Binding PlextorPoweRecEnabled}">
                        <StackPanel Orientation="Vertical"
                                    IsVisible="{Binding PlextorPoweRecRecommendedVisible}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding PlextorPoweRecRecommendedLabel}" />
                                <TextBox Text="{Binding PlextorPoweRecRecommended}"
                                         IsReadOnly="True" />
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Vertical"
                                    IsVisible="{Binding PlextorPoweRecSelectedVisible}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding PlextorPoweRecSelectedLabel}" />
                                <TextBox Text="{Binding PlextorPoweRecSelected}"
                                         IsReadOnly="True" />
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Vertical"
                                    IsVisible="{Binding PlextorPoweRecMaxVisible}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding PlextorPoweRecMaxLabel}" />
                                <TextBox Text="{Binding PlextorPoweRecMax}"
                                         IsReadOnly="True" />
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Vertical"
                                    IsVisible="{Binding PlextorPoweRecLastVisible}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding PlextorPoweRecLastLabel}" />
                                <TextBox Text="{Binding PlextorPoweRecLast}"
                                         IsReadOnly="True" />
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                    <CheckBox IsChecked="{Binding PlextorSilentMode}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding PlextorSilentModeLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding PlextorSilentModeEnabled}"
                              IsEnabled="False"
                              IsVisible="{Binding PlextorSilentMode}">
                        <TextBlock Text="{Binding PlextorSilentModeEnabledLabel}" />
                    </CheckBox>
                    <StackPanel Orientation="Vertical"
                                IsVisible="{Binding PlextorSilentModeEnabled}">
                        <TextBlock Text="{Binding PlextorSilentModeAccessTime}" />
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding PlextorSilentModeCdReadSpeedLimitLabel}" />
                            <TextBox Text="{Binding PlextorSilentModeCdReadSpeedLimit}"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding PlextorSilentModeCdWriteSpeedLimitLabel}" />
                            <TextBox Text="{Binding PlextorSilentModeCdWriteSpeedLimit}"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Orientation="Vertical"
                                    IsVisible="{Binding PlextorSilentModeDvdReadSpeedLimitVisible}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding PlextorSilentModeDvdReadSpeedLimitLabel}" />
                                <TextBox Text="{Binding PlextorSilentModeDvdReadSpeedLimit}"
                                         IsReadOnly="True" />
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                    <CheckBox IsChecked="{Binding PlextorGigaRec}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding PlextorGigaRecLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding PlextorSecuRec}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding PlextorSecuRecLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding PlextorSpeedRead}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding PlextorSpeedReadLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding PlextorSpeedEnabled}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding PlextorSpeedEnabledLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding PlextorHiding}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding PlextorHidingLabel}" />
                    </CheckBox>
                    <StackPanel Orientation="Vertical"
                                IsVisible="{Binding PlextorHiding}">
                        <CheckBox IsChecked="{Binding PlextorHidesRecordables}"
                                  IsEnabled="False">
                            <TextBlock Text="{Binding PlextorHidesRecordablesLabel}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding PlextorHidesSessions}"
                                  IsEnabled="False">
                            <TextBlock Text="{Binding PlextorHidesSessionsLabel}" />
                        </CheckBox>
                    </StackPanel>
                    <CheckBox IsChecked="{Binding PlextorVariRec}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding PlextorVariRecLabel}" />
                    </CheckBox>
                    <StackPanel Orientation="Vertical"
                                IsVisible="{Binding PlextorDvd}">
                        <CheckBox IsChecked="{Binding PlextorVariRecDvd}"
                                  IsEnabled="False">
                            <TextBlock Text="{Binding PlextorVariRecDvdLabel}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding PlextorBitSetting}"
                                  IsEnabled="False">
                            <TextBlock Text="{Binding PlextorBitSettingLabel}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding PlextorBitSettingDl}"
                                  IsEnabled="False">
                            <TextBlock Text="{Binding PlextorBitSettingDlLabel}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding PlextorDvdPlusWriteTest}"
                                  IsEnabled="False">
                            <TextBlock Text="{Binding PlextorDvdPlusWriteTestLabel}" />
                        </CheckBox>
                    </StackPanel>
                </StackPanel>
            </TabItem>
            <TabItem IsVisible="{Binding Kreon}">
                <TabItem.Header>
                    <TextBlock Text="{Binding KreonLabel}" />
                </TabItem.Header>
                <StackPanel Orientation="Vertical">
                    <CheckBox IsChecked="{Binding KreonChallengeResponse}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonChallengeResponseLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonDecryptSs}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonDecryptSsLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonXtremeUnlock}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonXtremeUnlockLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonWxripperUnlock}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonWxripperUnlockLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonChallengeResponse360}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonChallengeResponse360Label}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonDecryptSs360}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonDecryptSs360Label}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonXtremeUnlock360}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonXtremeUnlock360Label}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonWxripperUnlock360}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonWxripperUnlock360Label}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonLock}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonSetLockedLabel}" />
                    </CheckBox>
                    <CheckBox IsChecked="{Binding KreonErrorSkipping}"
                              IsEnabled="False">
                        <TextBlock Text="{Binding KreonErrorSkippingLabel}" />
                    </CheckBox>
                </StackPanel>
            </TabItem>
            <TabItem IsVisible="{Binding Ssc}">
                <TabItem.Header>
                    <TextBlock Text="{Binding SSCLabel}" />
                </TabItem.Header>
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Vertical"
                                IsVisible="{Binding BlockLimits}">
                        <TextBlock Text="{Binding MinBlockSize}"
                                   IsVisible="{Binding !!MinBlockSize}" />
                        <TextBlock Text="{Binding MaxBlockSize}"
                                   IsVisible="{Binding !!MaxBlockSize}" />
                        <TextBlock Text="{Binding BlockSizeGranularity}"
                                   IsVisible="{Binding !!BlockSizeGranularity}" />
                    </StackPanel>
                    <StackPanel Orientation="Vertical"
                                IsVisible="{Binding !!Densities}">
                        <TextBlock Text="{Binding DensitiesSupportedByDeviceLabel}" />
                        <TextBox Text="{Binding Densities}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <StackPanel Orientation="Vertical"
                                IsVisible="{Binding !!MediumTypes}">
                        <TextBlock Text="{Binding MediumTypesSupportedByDeviceLabel}" />
                        <TextBox Text="{Binding MediumTypes}"
                                 IsReadOnly="True" />
                    </StackPanel>
                    <TextBox Text="{Binding MediumDensity}"
                             IsReadOnly="True"
                             IsVisible="{Binding !!MediumDensity}" />
                </StackPanel>
            </TabItem>
            <TabItem IsVisible="{Binding SecureDigital}">
                <TabItem.Header>
                    <TextBlock Text="{Binding SdMmcText}" />
                </TabItem.Header>
                <TabControl>
                    <TabItem IsVisible="{Binding !!Cid}">
                        <TabItem.Header>
                            <TextBlock Text="{Binding CIDLabel}" />
                        </TabItem.Header>
                        <TextBox Text="{Binding Cid}"
                                 IsReadOnly="True" />
                    </TabItem>
                    <TabItem IsVisible="{Binding !!Csd}">
                        <TabItem.Header>
                            <TextBlock Text="{Binding CSDLabel}" />
                        </TabItem.Header>
                        <TextBox Text="{Binding Csd}"
                                 IsReadOnly="True" />
                    </TabItem>
                    <TabItem IsVisible="{Binding !!Ocr}">
                        <TabItem.Header>
                            <TextBlock Text="{Binding OCRLabel}" />
                        </TabItem.Header>
                        <TextBox Text="{Binding Ocr}"
                                 IsReadOnly="True" />
                    </TabItem>
                    <TabItem IsVisible="{Binding !!ExtendedCsd}">
                        <TabItem.Header>
                            <TextBlock Text="{Binding ExtendedCSDLabel}" />
                        </TabItem.Header>
                        <TextBox Text="{Binding ExtendedCsd}"
                                 IsReadOnly="True" />
                    </TabItem>
                    <TabItem IsVisible="{Binding !!Scr}">
                        <TabItem.Header>
                            <TextBlock Text="{Binding SCRLabel}" />
                        </TabItem.Header>
                        <TextBox Text="{Binding Scr}"
                                 IsReadOnly="True" />
                    </TabItem>
                </TabControl>
            </TabItem>
            <TabItem IsVisible="{Binding !!PcmciaInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding PcmciaLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding PcmciaInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!AtaInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding ATA_ATAPILabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding AtaInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!ScsiInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding SCSILabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding ScsiInfo}" />
            </TabItem>
            <TabItem IsVisible="{Binding !!SdMmcInfo}">
                <TabItem.Header>
                    <TextBlock Text="{Binding Sd_MMCLabel}" />
                </TabItem.Header>
                <ContentControl Content="{Binding SdMmcInfo}" />
            </TabItem>
        </TabControl>
    </StackPanel>
</UserControl>