using System.Collections.ObjectModel;
using CommunityToolkit.Mvvm.ComponentModel;
using GsaEditor.Core.Models;
namespace GsaEditor.ViewModels;
///
/// Represents a node in the archive tree view.
/// Can be a folder (with children) or a leaf file node (with an associated ).
///
public partial class EntryTreeNodeViewModel : ViewModelBase
{
[ObservableProperty]
private string _name = string.Empty;
///
/// Full relative path of this node within the archive (using '/' separator).
///
public string FullPath { get; set; } = string.Empty;
///
/// Whether this node represents a folder (true) or a file (false).
///
public bool IsFolder { get; set; }
///
/// Whether this node represents a file.
///
public bool IsFile => !IsFolder;
///
/// The archive entry this node represents. Null for folder nodes.
///
public GsaEntry? Entry { get; set; }
///
/// Child nodes (sub-folders and files within this folder).
///
public ObservableCollection Children { get; } = new();
}