<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:windows="clr-namespace:Aaru.Tui.ViewModels.Windows"
             xmlns:brushes="https://github.com/jinek/consolonia"
             xmlns:localization="clr-namespace:Aaru.Tui.Localization"
             xmlns:mvvm="http://prismlibrary.com/"
             mc:Ignorable="d"
             d:DesignWidth="800"
             d:DesignHeight="450"
             x:Class="Aaru.Tui.Views.Windows.ImageWindow"
             x:DataType="windows:ImageWindowViewModel"
             mvvm:ViewModelLocator.AutoWireViewModel="True">
    <Design.DataContext>
        <windows:ImageWindowViewModel />
    </Design.DataContext>
    <DockPanel Background="{DynamicResource CyberBackgroundPrimaryBrush}">
        <Menu DockPanel.Dock="Bottom"
              Background="{DynamicResource CyberBackgroundPrimaryBrush}"
              Foreground="{DynamicResource CyberNeonCyanBrush}"
              HorizontalAlignment="Stretch">
            <MenuItem Header="{x:Static localization:Resources.Back_Header}"
                      Command="{Binding BackCommand, Mode=OneWay}"
                      HotKey="Escape" />
            <MenuItem Header="{x:Static localization:Resources.Help_Header}"
                      Command="{Binding HelpCommand, Mode=OneWay}"
                      HotKey="F1" />
            <MenuItem Header="F2      " />
            <MenuItem Header="{x:Static localization:Resources.Exit_Header}"
                      Command="{Binding ExitCommand, Mode=OneWay}"
                      HotKey="F10" />
        </Menu>
        <Border BorderThickness="1"
                Background="{DynamicResource CyberBackgroundPrimaryBrush}">
            <Border.BorderBrush>
                <brushes:LineBrush LineStyle="DoubleLine"
                                   Brush="Cyan" />
            </Border.BorderBrush>
            <Grid RowDefinitions="Auto,*,Auto">
                <TextBlock Grid.Row="0"
                           Text="{Binding FilePath, Mode=OneWay}"
                           Foreground="{DynamicResource CyberNeonLimeBrush}"
                           HorizontalAlignment="Center" />
                <Grid ColumnDefinitions="*,*"
                      Grid.Row="1">
                    <Border BorderThickness="1"
                            Grid.Column="0"
                            Background="{DynamicResource CyberBackgroundPrimaryBrush}">
                        <Border.BorderBrush>
                            <brushes:LineBrush LineStyle="DoubleLine"
                                               Brush="Cyan" />
                        </Border.BorderBrush>
                        <TreeView ItemsSource="{Binding Nodes, Mode=OneWay}"
                                  Background="{DynamicResource CyberBackgroundPrimaryBrush}"
                                  Foreground="{DynamicResource CyberNeonCyanBrush}"
                                  SelectedItem="{Binding SelectedNode, Mode=TwoWay}"
                                  BorderThickness="0">
                            <TreeView.ItemTemplate>
                                <TreeDataTemplate ItemsSource="{Binding SubNodes, Mode=OneWay}">
                                    <TextBlock Text="{Binding Title, Mode=OneWay}"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}" />
                                </TreeDataTemplate>
                            </TreeView.ItemTemplate>
                        </TreeView>
                    </Border>
                    <Border BorderThickness="1"
                            Grid.Column="1"
                            IsVisible="{Binding IsPartitionInformationVisible, Mode=OneWay}"
                            Background="{DynamicResource CyberBackgroundPrimaryBrush}">
                        <Border.BorderBrush>
                            <brushes:LineBrush LineStyle="DoubleLine"
                                               Brush="Magenta" />
                        </Border.BorderBrush>
                        <ScrollViewer>
                            <StackPanel HorizontalAlignment="Stretch">
                                <TextBlock Text="{x:Static localization:Resources.PartitionInformation_Text}"
                                           Foreground="{DynamicResource CyberNeonMagentaBrush}"
                                           HorizontalAlignment="Center"
                                           FontWeight="Bold" />
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionSequence_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonLimeBrush}"
                                               Text="{Binding PartitionSequence, Mode=OneWay}" />
                                </Grid>
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionName_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonLimeBrush}"
                                               Text="{Binding PartitionName, Mode=OneWay}" />
                                </Grid>
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionType_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonMagentaBrush}"
                                               Text="{Binding PartitionType, Mode=OneWay}" />
                                </Grid>
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionStartingSector_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonYellowBrush}"
                                               Text="{Binding PartitionStart, Mode=OneWay}" />
                                </Grid>
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionOffset_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonLimeBrush}"
                                               Text="{Binding PartitionOffset, Mode=OneWay}" />
                                </Grid>
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionLength_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonYellowBrush}"
                                               Text="{Binding PartitionLength, Mode=OneWay}" />
                                </Grid>
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionSize_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonLimeBrush}"
                                               Text="{Binding PartitionSize, Mode=OneWay}" />
                                </Grid>
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionScheme_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonMagentaBrush}"
                                               Text="{Binding PartitionScheme, Mode=OneWay}" />
                                </Grid>
                                <Grid ColumnDefinitions="Auto,*"
                                      ColumnSpacing="1">
                                    <TextBlock Grid.Column="0"
                                               Foreground="{DynamicResource CyberNeonCyanBrush}"
                                               Text="{x:Static localization:Resources.PartitionDescription_Text}" />
                                    <TextBlock Grid.Column="1"
                                               Foreground="{DynamicResource CyberNeonPinkBrush}"
                                               Text="{Binding PartitionDescription, Mode=OneWay}" />
                                </Grid>
                            </StackPanel>
                        </ScrollViewer>
                    </Border>
                    <Border BorderThickness="1"
                            Grid.Column="1"
                            IsVisible="{Binding IsFilesystemInformationVisible, Mode=OneWay}"
                            Background="{DynamicResource CyberBackgroundPrimaryBrush}">
                        <Border.BorderBrush>
                            <brushes:LineBrush LineStyle="DoubleLine"
                                               Brush="Magenta" />
                        </Border.BorderBrush>
                        <ScrollViewer>
                            <StackPanel>
                                <TextBlock Foreground="{DynamicResource CyberNeonMagentaBrush}"
                                           Text="{x:Static localization:Resources.FilesystemInformation_Text}"
                                           HorizontalAlignment="Center"
                                           FontWeight="Bold" />
                                <TextBox Background="{DynamicResource CyberBackgroundTertiaryBrush}"
                                         Foreground="{DynamicResource CyberNeonCyanBrush}"
                                         TextWrapping="Wrap"
                                         Text="{Binding FilesystemInformation, Mode=OneWay}"
                                         IsReadOnly="True"
                                         BorderBrush="{DynamicResource CyberNeonCyanBrush}"
                                         BorderThickness="1" />
                            </StackPanel>
                        </ScrollViewer>
                    </Border>
                </Grid>
                <TextBlock Grid.Row="2"
                           Text="{Binding Status, Mode=OneWay}"
                           IsVisible="{Binding IsStatusVisible, Mode=OneWay}"
                           Foreground="{DynamicResource CyberNeonMagentaBrush}" />
            </Grid>
        </Border>
    </DockPanel>
</UserControl>