using MudBlazor; namespace DeepDrftPublic.Client.Layout; public class PageRoute { public string Name { get; set; } = string.Empty; public string Route { get; set; } = string.Empty; public string? Icon { get; set; } = null; // Optional one-level fan-out. A node with children is a dual-role node: its own Route is a // real destination (desktop click / mobile tap navigate to it), and Children render as a // hover dropdown on desktop and an indented sub-list on mobile. Depth is capped at one level // by convention — children are not themselves expected to carry children. public IReadOnlyList Children { get; set; } = []; public bool HasChildren => Children.Count > 0; } public static class Pages { public static readonly List MenuPages = [ new() { Name = "Archive", Route = "/archive", Icon = Icons.Material.Filled.Inventory2, Children = [ new() { Name = "Cuts", Route = "/cuts", Icon = Icons.Material.Filled.Album }, new() { Name = "Sessions", Route = "/sessions", Icon = Icons.Material.Filled.Piano }, new() { Name = "Mixes", Route = "/mixes", Icon = Icons.Material.Filled.GraphicEq }, ], }, new() { Name = "Tracks", Route = "/tracks", Icon = Icons.Material.Filled.MusicNote }, new() { Name = "Genres", Route = "/genres", Icon = Icons.Material.Filled.Category }, ]; public static readonly List AllPages = new List { new() { Name = "Home", Route = "/", Icon = Icons.Material.Filled.Home } }.Concat(MenuPages).ToList(); }