<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:gui="clr-namespace:Aaru.Gui.Localization"
        mc:Ignorable="d"
        d:DesignWidth="1200"
        d:DesignHeight="800"
        Width="1200"
        Height="800"
        x:Class="Aaru.Gui.Views.Windows.MetadataEditor"
        x:DataType="windows:MetadataEditorViewModel"
        Title="{Binding Title, Mode=OneWay}"
        Icon="/Assets/aaru.png">
    <Design.DataContext>
        <windows:MetadataEditorViewModel />
    </Design.DataContext>

    <Window.Styles>
        <Style Selector="TabItem">

            <Setter Property="Padding"
                    Value="12,8" />
        </Style>
        <Style Selector="TextBox">
            <Setter Property="Margin"
                    Value="0,4" />
            <Setter Property="Background"
                    Value="{DynamicResource TextControlBackground}" />
            <Setter Property="Foreground"
                    Value="{DynamicResource TextControlForeground}" />
            <Setter Property="BorderBrush"
                    Value="{DynamicResource TextControlBorderBrush}" />
            <Setter Property="BorderThickness"
                    Value="1" />
            <Setter Property="CornerRadius"
                    Value="3" />
        </Style>
        <Style Selector="TextBox:focus">
            <Setter Property="BorderBrush"
                    Value="{DynamicResource SystemAccentColor}" />
        </Style>
        <Style Selector="ComboBox">
            <Setter Property="Margin"
                    Value="0,4" />
            <Setter Property="Background"
                    Value="{DynamicResource ComboBoxBackground}" />
            <Setter Property="Foreground"
                    Value="{DynamicResource ComboBoxForeground}" />
            <Setter Property="BorderBrush"
                    Value="{DynamicResource ComboBoxBorderBrush}" />
            <Setter Property="CornerRadius"
                    Value="3" />
        </Style>
        <Style Selector="DatePicker">
            <Setter Property="Margin"
                    Value="0,4" />
        </Style>
        <Style Selector="Button">
            <Setter Property="Background"
                    Value="{DynamicResource AccentButtonBackground}" />
            <Setter Property="Foreground"
                    Value="{DynamicResource AccentButtonForeground}" />
            <Setter Property="BorderThickness"
                    Value="0" />
            <Setter Property="CornerRadius"
                    Value="3" />
            <Setter Property="Padding"
                    Value="12,6" />
            <Setter Property="Cursor"
                    Value="Hand" />
        </Style>
        <Style Selector="Button:pointerover">
            <Setter Property="Background"
                    Value="{DynamicResource AccentButtonBackgroundPointerOver}" />
        </Style>
        <Style Selector="Button.danger">
            <Setter Property="Background"
                    Value="#C42B1C" />
            <Setter Property="Foreground"
                    Value="White" />
        </Style>
        <Style Selector="Button.danger:pointerover">
            <Setter Property="Background"
                    Value="#E81123" />
        </Style>
        <Style Selector="Button.success">
            <Setter Property="Background"
                    Value="#107C10" />
            <Setter Property="Foreground"
                    Value="White" />
        </Style>
        <Style Selector="Button.success:pointerover">
            <Setter Property="Background"
                    Value="#13A10E" />
        </Style>
        <Style Selector="ListBox">
            <Setter Property="Background"
                    Value="{DynamicResource ListBoxBackground}" />
            <Setter Property="BorderBrush"
                    Value="{DynamicResource ListBoxBorderBrush}" />
            <Setter Property="BorderThickness"
                    Value="1" />
            <Setter Property="CornerRadius"
                    Value="3" />
        </Style>
        <Style Selector="ListBoxItem">
            <Setter Property="Padding"
                    Value="8,4" />
        </Style>
        <Style Selector="ListBoxItem:selected">
            <Setter Property="Background"
                    Value="{DynamicResource ListBoxItemBackgroundSelected}" />
        </Style>
        <Style Selector="TextBlock.label">
            <Setter Property="Margin"
                    Value="0,8,0,2" />
            <Setter Property="FontWeight"
                    Value="SemiBold" />
            <Setter Property="Foreground"
                    Value="{DynamicResource TextControlForeground}" />
        </Style>
        <Style Selector="TextBlock.section-header">
            <Setter Property="FontSize"
                    Value="16" />
            <Setter Property="FontWeight"
                    Value="Bold" />
            <Setter Property="Margin"
                    Value="0,12,0,8" />
            <Setter Property="Foreground"
                    Value="{DynamicResource TextControlForeground}" />
        </Style>
        <Style Selector="Border.section">
            <Setter Property="Background"
                    Value="{DynamicResource CardBackgroundFillColorDefaultBrush}" />
            <Setter Property="BorderBrush"
                    Value="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
            <Setter Property="BorderThickness"
                    Value="1" />
            <Setter Property="CornerRadius"
                    Value="4" />
            <Setter Property="Padding"
                    Value="12" />
            <Setter Property="Margin"
                    Value="0,8" />
        </Style>
        <Style Selector="Border.item">
            <Setter Property="BorderBrush"
                    Value="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
            <Setter Property="BorderThickness"
                    Value="1" />
            <Setter Property="CornerRadius"
                    Value="3" />
            <Setter Property="Padding"
                    Value="8" />
            <Setter Property="Margin"
                    Value="4" />
        </Style>
    </Window.Styles>

    <DockPanel>
        <!-- Bottom buttons -->
        <StackPanel DockPanel.Dock="Bottom"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right"
                    Margin="12"
                    Spacing="8">
            <Button Classes="success"
                    Content="{x:Static gui:GUI.Button_Save}"
                    Command="{Binding SaveCommand, Mode=OneWay}"
                    Width="100" />
            <Button Content="{x:Static gui:GUI.Button_Cancel}"
                    Command="{Binding CancelCommand, Mode=OneWay}"
                    Width="100" />
        </StackPanel>

        <!-- Main content with tabs -->
        <TabControl DockPanel.Dock="Top">
            <!-- Basic Information Tab -->
            <TabItem Header="{x:Static gui:GUI.Header_Basic_Information}">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="12">
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_General_Information}" />
                        <Border Classes="section">
                            <StackPanel>
                                <TextBlock Classes="label"
                                           Text="{x:Static gui:GUI.Label_Name}" />
                                <TextBox Text="{Binding Name, Mode=TwoWay}"
                                         Watermark="{x:Static gui:GUI.Watermark_Enter_name}" />

                                <TextBlock Classes="label"
                                           Text="{x:Static gui:GUI.Label_Version}" />
                                <TextBox Text="{Binding Version, Mode=TwoWay}"
                                         Watermark="{x:Static gui:GUI.Watermark_Enter_version}" />

                                <TextBlock Classes="label"
                                           Text="{x:Static gui:GUI.Label_Release_type}" />
                                <ComboBox ItemsSource="{Binding AvailableReleaseTypes, Mode=OneWay}"
                                          SelectedItem="{Binding SelectedReleaseType, Mode=TwoWay}"
                                          PlaceholderText="{x:Static gui:GUI.Placeholder_Select_release_type}" />

                                <TextBlock Classes="label"
                                           Text="{x:Static gui:GUI.Label_Release_Date}" />
                                <DatePicker SelectedDate="{Binding ReleaseDate, Mode=TwoWay}" />

                                <TextBlock Classes="label"
                                           Text="{x:Static gui:GUI.Label_Part_Number}" />
                                <TextBox Text="{Binding PartNumber, Mode=TwoWay}"
                                         Watermark="{x:Static gui:GUI.Watermark_Enter_part_number}" />

                                <TextBlock Classes="label"
                                           Text="{x:Static gui:GUI.Label_Serial_Number}" />
                                <TextBox Text="{Binding SerialNumber, Mode=TwoWay}"
                                         Watermark="{x:Static gui:GUI.Watermark_Enter_serial_number}" />
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>

            <!-- People & Organizations Tab -->
            <TabItem Header="{x:Static gui:GUI.Header_People_and_Organizations}">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="12">
                        <!-- Developers -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Developers}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Developer}"
                                        Command="{Binding AddDeveloperCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Developers, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel HorizontalSpacing="8">
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemoveDeveloperCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                         Watermark="{x:Static gui:GUI.Watermark_Enter_developer_name}" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Publishers -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Publishers}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Publisher}"
                                        Command="{Binding AddPublisherCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Publishers, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemovePublisherCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                         Watermark="{x:Static gui:GUI.Watermark_Enter_publisher_name}" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Authors -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Authors}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Author}"
                                        Command="{Binding AddAuthorCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Authors, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemoveAuthorCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                         Watermark="{x:Static gui:GUI.Watermark_Enter_author_name}" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Performers -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Performers}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Performer}"
                                        Command="{Binding AddPerformerCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Performers, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemovePerformerCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                         Watermark="{x:Static gui:GUI.Watermark_Enter_performer_name}" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>

            <!-- Classification Tab -->
            <TabItem Header="{x:Static gui:GUI.Header_Classification}">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="12">
                        <!-- Keywords -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Keywords}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Keyword}"
                                        Command="{Binding AddKeywordCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Keywords, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemoveKeywordCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                         Watermark="{x:Static gui:GUI.Watermark_Enter_keyword}" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Categories -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Categories}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Category}"
                                        Command="{Binding AddCategoryCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Categories, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemoveCategoryCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                         Watermark="{x:Static gui:GUI.Watermark_Enter_category}" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Subcategories -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Subcategories}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Subcategory}"
                                        Command="{Binding AddSubcategoryCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Subcategories, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemoveSubcategoryCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                         Watermark="{x:Static gui:GUI.Watermark_Enter_subcategory}" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Systems -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Systems}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_System}"
                                        Command="{Binding AddSystemCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Systems, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemoveSystemCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                         Watermark="{x:Static gui:GUI.Watermark_Enter_system}" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>

            <!-- Technical Details Tab -->
            <TabItem Header="{x:Static gui:GUI.Header_Technical_Details}">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="12">
                        <!-- Languages -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Languages}" />
                        <Border Classes="section">
                            <StackPanel>
                                <DockPanel Margin="0,0,0,8">
                                    <Button DockPanel.Dock="Right"
                                            Content="{x:Static gui:GUI.Button_Add}"
                                            Command="{Binding AddLanguageCommand, Mode=OneWay}"
                                            CommandParameter="{Binding #languageCombo.SelectedItem, Mode=OneWay}" />
                                    <ComboBox x:Name="languageCombo"
                                              ItemsSource="{Binding AvailableLanguages, Mode=OneWay}"
                                              PlaceholderText="{x:Static gui:GUI.Placeholder_Select_language_to_add}" />
                                </DockPanel>
                                <ListBox ItemsSource="{Binding Languages, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemoveLanguageCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBlock Text="{Binding Value, Mode=TwoWay}"
                                                           VerticalAlignment="Center"
                                                           Margin="8,0" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Architectures -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Architectures}" />
                        <Border Classes="section">
                            <StackPanel>
                                <DockPanel Margin="0,0,0,8">
                                    <Button DockPanel.Dock="Right"
                                            Content="{x:Static gui:GUI.Button_Add}"
                                            Command="{Binding AddArchitectureCommand, Mode=OneWay}"
                                            CommandParameter="{Binding #archCombo.SelectedItem, Mode=OneWay}" />
                                    <ComboBox x:Name="archCombo"
                                              ItemsSource="{Binding AvailableArchitectures, Mode=OneWay}"
                                              PlaceholderText="{x:Static gui:GUI.Placeholder_Select_architecture_to_add}" />
                                </DockPanel>
                                <ListBox ItemsSource="{Binding Architectures, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Button DockPanel.Dock="Right"
                                                        Classes="danger"
                                                        Content="{x:Static gui:GUI.Button_Remove}"
                                                        Command="{Binding $parent[Window].DataContext.RemoveArchitectureCommand, Mode=OneWay}"
                                                        CommandParameter="{Binding Mode=OneWay}" />
                                                <TextBlock Text="{Binding Value, Mode=TwoWay}"
                                                           VerticalAlignment="Center"
                                                           Margin="8,0" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Required Operating Systems -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Required_Operating_Systems}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Operating_System}"
                                        Command="{Binding AddRequiredOperatingSystemCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding RequiredOperatingSystems, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="300">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <DockPanel>
                                                        <Button DockPanel.Dock="Right"
                                                                Classes="danger"
                                                                Content="{x:Static gui:GUI.Button_Remove}"
                                                                Command="{Binding $parent[Window].DataContext.RemoveRequiredOSCommand, Mode=OneWay}"
                                                                CommandParameter="{Binding Mode=OneWay}" />
                                                        <TextBlock Classes="label"
                                                                   Text="{x:Static gui:GUI.Label_OS_Name}" />
                                                    </DockPanel>
                                                    <TextBox Text="{Binding Name, Mode=TwoWay}"
                                                             Watermark="{x:Static gui:GUI.Watermark_Enter_OS_name}" />
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>

            <!-- Barcodes Tab -->
            <TabItem Header="{x:Static gui:GUI.Header_Barcodes}">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="12">
                        <Button Content="{x:Static gui:GUI.Button_Add_Barcode}"
                                Command="{Binding AddBarcodeCommand, Mode=OneWay}"
                                HorizontalAlignment="Left"
                                Margin="0,0,0,8" />
                        <ListBox ItemsSource="{Binding Barcodes, Mode=OneWay}"
                                 MinHeight="200">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <Border Classes="item">
                                        <StackPanel>
                                            <Button Classes="danger"
                                                    Content="{x:Static gui:GUI.Button_Remove_Barcode}"
                                                    HorizontalAlignment="Right"
                                                    Command="{Binding $parent[Window].DataContext.RemoveBarcodeCommand, Mode=OneWay}"
                                                    CommandParameter="{Binding Mode=OneWay}" />

                                            <TextBlock Classes="label"
                                                       Text="{x:Static gui:GUI.Label_Barcode_Type}" />
                                            <ComboBox
                                                ItemsSource="{Binding $parent[Window].DataContext.AvailableBarcodeTypes, Mode=OneWay}"
                                                SelectedItem="{Binding Type, Mode=TwoWay}" />

                                            <TextBlock Classes="label"
                                                       Text="{x:Static gui:GUI.Label_Value}" />
                                            <TextBox Text="{Binding Value, Mode=TwoWay}"
                                                     Watermark="{x:Static gui:GUI.Watermark_Enter_barcode_value}" />
                                        </StackPanel>
                                    </Border>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>

            <!-- Publications Tab -->
            <TabItem Header="{x:Static gui:GUI.Header_Publications}">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="12">
                        <!-- Magazines -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Magazines}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Magazine}"
                                        Command="{Binding AddMagazineCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Magazines, Mode=OneWay}"
                                         MinHeight="150"
                                         MaxHeight="300">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemoveMagazineCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <TextBlock Classes="label"
                                                               Text="{x:Static gui:GUI.Label_Name}" />
                                                    <TextBox Text="{Binding Name, Mode=TwoWay}" />

                                                    <TextBlock Classes="label"
                                                               Text="{x:Static gui:GUI.Label_Editorial}" />
                                                    <TextBox Text="{Binding Editorial, Mode=TwoWay}" />

                                                    <Grid ColumnDefinitions="*,*"
                                                          ColumnSpacing="8">
                                                        <StackPanel Grid.Column="0">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Number}" />
                                                            <TextBox Text="{Binding Number, Mode=TwoWay}" />
                                                        </StackPanel>
                                                        <StackPanel Grid.Column="1">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Pages}" />
                                                            <TextBox Text="{Binding Pages, Mode=TwoWay}" />
                                                        </StackPanel>
                                                    </Grid>
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Books -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Books}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Book}"
                                        Command="{Binding AddBookCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Books, Mode=OneWay}"
                                         MinHeight="150"
                                         MaxHeight="300">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemoveBookCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <TextBlock Classes="label"
                                                               Text="{x:Static gui:GUI.Label_Name}" />
                                                    <TextBox Text="{Binding Name, Mode=TwoWay}" />

                                                    <TextBlock Classes="label"
                                                               Text="{x:Static gui:GUI.Label_Author}" />
                                                    <TextBox Text="{Binding Author, Mode=TwoWay}" />

                                                    <TextBlock Classes="label"
                                                               Text="{x:Static gui:GUI.Label_Editorial}" />
                                                    <TextBox Text="{Binding Editorial, Mode=TwoWay}" />

                                                    <TextBlock Classes="label"
                                                               Text="{x:Static gui:GUI.Label_Pages}" />
                                                    <TextBox Text="{Binding Pages, Mode=TwoWay}" />
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- User Manuals -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_User_Manuals}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_User_Manual}"
                                        Command="{Binding AddUserManualCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding UserManuals, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="200">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemoveUserManualCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <Grid ColumnDefinitions="*,*"
                                                          ColumnSpacing="8">
                                                        <StackPanel Grid.Column="0">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Pages}" />
                                                            <TextBox Text="{Binding Pages, Mode=TwoWay}" />
                                                        </StackPanel>
                                                        <StackPanel Grid.Column="1">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Page_Size}" />
                                                            <TextBox Text="{Binding PageSize, Mode=TwoWay}" />
                                                        </StackPanel>
                                                    </Grid>
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>

            <!-- Media Tab -->
            <TabItem Header="{x:Static gui:GUI.Header_Media}">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="12">
                        <!-- Optical Discs -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Optical_Discs}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Optical_Disc}"
                                        Command="{Binding AddOpticalDiscCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding OpticalDiscs, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="250">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemoveOpticalDiscCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <Grid ColumnDefinitions="*,*"
                                                          ColumnSpacing="8">
                                                        <StackPanel Grid.Column="0">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Part_Number}" />
                                                            <TextBox Text="{Binding PartNumber, Mode=TwoWay}" />
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Disc_Type}" />
                                                            <TextBox Text="{Binding DiscType, Mode=TwoWay}" />
                                                        </StackPanel>
                                                        <StackPanel Grid.Column="1">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Serial_Number}" />
                                                            <TextBox Text="{Binding SerialNumber, Mode=TwoWay}" />
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Disc_SubType}" />
                                                            <TextBox Text="{Binding DiscSubType, Mode=TwoWay}" />
                                                        </StackPanel>
                                                    </Grid>
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Block Media -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Block_Media}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Block_Media}"
                                        Command="{Binding AddBlockMediaCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding BlockMedias, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="250">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemoveBlockMediaCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <Grid ColumnDefinitions="*,*"
                                                          ColumnSpacing="8">
                                                        <StackPanel Grid.Column="0">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Manufacturer}" />
                                                            <TextBox Text="{Binding Manufacturer, Mode=TwoWay}" />
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Serial}" />
                                                            <TextBox Text="{Binding Serial, Mode=TwoWay}" />
                                                        </StackPanel>
                                                        <StackPanel Grid.Column="1">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Model}" />
                                                            <TextBox Text="{Binding Model, Mode=TwoWay}" />
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Firmware}" />
                                                            <TextBox Text="{Binding Firmware, Mode=TwoWay}" />
                                                        </StackPanel>
                                                    </Grid>
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Linear Media -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Linear_Media}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Linear_Media}"
                                        Command="{Binding AddLinearMediaCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding LinearMedias, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="250">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemoveLinearMediaCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <Grid ColumnDefinitions="*,*"
                                                          ColumnSpacing="8">
                                                        <StackPanel Grid.Column="0">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Manufacturer}" />
                                                            <TextBox Text="{Binding Manufacturer, Mode=TwoWay}" />
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Part_Number}" />
                                                            <TextBox Text="{Binding PartNumber, Mode=TwoWay}" />
                                                        </StackPanel>
                                                        <StackPanel Grid.Column="1">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Model}" />
                                                            <TextBox Text="{Binding Model, Mode=TwoWay}" />
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Serial_Number}" />
                                                            <TextBox Text="{Binding SerialNumber, Mode=TwoWay}" />
                                                        </StackPanel>
                                                    </Grid>
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Audio Media -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Audio_Media}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Audio_Media}"
                                        Command="{Binding AddAudioMediaCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding AudioMedias, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="250">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemoveAudioMediaCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <Grid ColumnDefinitions="*,*"
                                                          ColumnSpacing="8">
                                                        <StackPanel Grid.Column="0">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Manufacturer}" />
                                                            <TextBox Text="{Binding Manufacturer, Mode=TwoWay}" />
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Part_Number}" />
                                                            <TextBox Text="{Binding PartNumber, Mode=TwoWay}" />
                                                        </StackPanel>
                                                        <StackPanel Grid.Column="1">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Model}" />
                                                            <TextBox Text="{Binding Model, Mode=TwoWay}" />
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Serial_Number}" />
                                                            <TextBox Text="{Binding SerialNumber, Mode=TwoWay}" />
                                                        </StackPanel>
                                                    </Grid>
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>

            <!-- Hardware Tab -->
            <TabItem Header="{x:Static gui:GUI.Header_Hardware}">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="12">
                        <!-- PCI Cards -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_PCI_Cards}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_PCI_Card}"
                                        Command="{Binding AddPciCardCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding PciCards, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="250">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemovePciCardCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <Grid ColumnDefinitions="*,*"
                                                          ColumnSpacing="8">
                                                        <StackPanel Grid.Column="0">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Vendor_ID}" />
                                                            <TextBox Text="{Binding VendorID, Mode=TwoWay}" />
                                                        </StackPanel>
                                                        <StackPanel Grid.Column="1">
                                                            <TextBlock Classes="label"
                                                                       Text="{x:Static gui:GUI.Label_Device_ID}" />
                                                            <TextBox Text="{Binding DeviceID, Mode=TwoWay}" />
                                                        </StackPanel>
                                                    </Grid>
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>

                        <!-- Advertisements -->
                        <TextBlock Classes="section-header"
                                   Text="{x:Static gui:GUI.Header_Advertisements}" />
                        <Border Classes="section">
                            <StackPanel>
                                <Button Content="{x:Static gui:GUI.Button_Add_Advertisement}"
                                        Command="{Binding AddAdvertisementCommand, Mode=OneWay}"
                                        HorizontalAlignment="Left"
                                        Margin="0,0,0,8" />
                                <ListBox ItemsSource="{Binding Advertisements, Mode=OneWay}"
                                         MinHeight="100"
                                         MaxHeight="250">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Classes="item">
                                                <StackPanel>
                                                    <Button Classes="danger"
                                                            Content="{x:Static gui:GUI.Button_Remove}"
                                                            HorizontalAlignment="Right"
                                                            Command="{Binding $parent[Window].DataContext.RemoveAdvertisementCommand, Mode=OneWay}"
                                                            CommandParameter="{Binding Mode=OneWay}" />

                                                    <TextBlock Classes="label"
                                                               Text="{x:Static gui:GUI.Label_Manufacturer}" />
                                                    <TextBox Text="{Binding Manufacturer, Mode=TwoWay}" />

                                                    <TextBlock Classes="label"
                                                               Text="{x:Static gui:GUI.Label_Product}" />
                                                    <TextBox Text="{Binding Product, Mode=TwoWay}" />
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>
        </TabControl>
    </DockPanel>
</Window>