<!--
// /***************************************************************************
// Aaru Data Preservation Suite
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
// Filename       : DecodeMediaTags.xaml
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// Component      : GUI windows.
//
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
//     Media tags decoding window.
//
// ‐‐[ 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:windows="clr-namespace:Aaru.Gui.ViewModels.Windows"
        xmlns:localization="clr-namespace:Aaru.Localization;assembly=Aaru.Localization"
        xmlns:controls="clr-namespace:Aaru.Gui.Controls"
        mc:Ignorable="d"
        d:DesignWidth="800"
        d:DesignHeight="450"
        Width="640"
        Height="480"
        x:Class="Aaru.Gui.Views.Windows.DecodeMediaTags"
        Icon="/Assets/aaru.png"
        x:DataType="windows:DecodeMediaTagsViewModel"
        Title="{x:Static localization:UI.Title_Decode_media_tags}">
    <Design.DataContext>
        <windows:DecodeMediaTagsViewModel />
    </Design.DataContext>
    <Grid RowDefinitions="Auto,*"
          Margin="12"
          RowSpacing="8">
        <StackPanel Grid.Row="0"
                    Orientation="Horizontal"
                    Spacing="8">
            <TextBlock Text="{x:Static localization:UI.Title_Tag}"
                       VerticalAlignment="Center" />
            <ComboBox ItemsSource="{Binding TagsList, Mode=OneWay}"
                      SelectedItem="{Binding SelectedTag, Mode=TwoWay}">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name, Mode=OneWay}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </StackPanel>
        <TabControl Grid.Row="1">
            <TabItem>
                <TabItem.Header>
                    <TextBlock Text="{x:Static localization:UI.Title_HexView}" />
                </TabItem.Header>
                <controls:HexViewPanel Data="{Binding HexData, Mode=OneWay}"
                                       Margin="8" />
            </TabItem>
            <TabItem IsVisible="{Binding DecodedVisible, Mode=OneWay}">
                <TabItem.Header>
                    <TextBlock Text="{x:Static localization:UI.Title_Decoded}" />
                </TabItem.Header>
                <Border Margin="8"
                        BorderThickness="1"
                        BorderBrush="LightGray"
                        CornerRadius="8">
                    <ScrollViewer Padding="8">
                        <controls:SpectreTextBlock TextWrapping="Wrap"
                                                   Text="{Binding DecodedText, Mode=OneWay}" />
                    </ScrollViewer>
                </Border>
            </TabItem>
        </TabControl>
    </Grid>
</Window>