<!--
// /***************************************************************************
// Aaru Data Preservation Suite
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
// Filename       : Subdirectory.xaml
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// Component      : GUI panel.
//
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
//
//     Subdirectory contents 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-2026 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"
             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"
             x:DataType="panels:SubdirectoryViewModel"
             x:Class="Aaru.Gui.Views.Panels.Subdirectory">
    <Design.DataContext>
        <panels:SubdirectoryViewModel />
    </Design.DataContext>
    <DataGrid Margin="12"
              ItemsSource="{Binding Entries, Mode=OneWay}"
              IsReadOnly="True"
              SelectionMode="Extended"> <!-- TODO: SelectedItemsSource="{Binding SelectedEntries}" -->
        <DataGrid.Styles>
            <Style Selector="DataGridRow">
                <Setter Property="Foreground"
                        Value="{ReflectionBinding Color, Mode=OneWay}" />
            </Style>
        </DataGrid.Styles>
        <DataGrid.ContextMenu>
            <ContextMenu>
                <Button Command="{Binding ExtractFilesCommand, Mode=OneWay}">
                    <TextBlock Text="{x:Static localization:UI.ButtonLabel_Extract_to}" />
                </Button>
            </ContextMenu>
        </DataGrid.ContextMenu>
        <DataGrid.Columns>
            <DataGridTextColumn Binding="{Binding Name, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Name}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding Size, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Length}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding CreationTime, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Creation}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding LastAccessTime, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Last_access}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding ChangedTime, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Changed}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding LastBackupTime, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Last_backup}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding LastWriteTime, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Last_write}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding Attributes, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Attributes}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding Gid, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_GID}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding Uid, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_UID}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding Inode, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Inode}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding Links, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Links}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding Mode, Mode=OneWay}"
                                Width="Auto"
                                IsReadOnly="True">
                <DataGridTextColumn.Header>
                    <controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Mode}" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
        </DataGrid.Columns>
    </DataGrid>
</UserControl>