Files
BQP/srcs/RobotNet10/Components/RobotNet10.MapEditor/Models/TreeItemModel.cs
2026-07-13 09:25:40 +07:00

33 lines
782 B
C#

using MudBlazor;
namespace RobotNet10.MapEditor.Models;
/// <summary>
/// Model for tree item in LayoutTreePanel
/// </summary>
public class TreeItemModel
{
public string Id { get; set; } = Guid.NewGuid().ToString();
public string Text { get; set; } = "";
public string Icon { get; set; } = "";
public TreeItemType Type { get; set; }
public object? Data { get; set; }
public bool IsExpanded { get; set; } = false;
public List<TreeItemModel> Children { get; set; } = new();
// UI Properties
public string? BadgeText { get; set; }
public Color BadgeColor { get; set; } = Color.Default;
}
/// <summary>
/// Type of tree item
/// </summary>
public enum TreeItemType
{
Layout,
Version,
Level
}