A small record in the superuser module's command layer. Bundles a module's documentation pages, the permissions it declares and its optional admin menu window rows, defaulting Windows to an empty list when none are supplied.
using SboxSuperuser.Core.Documentation;
namespace SboxSuperuser.Engine.Commands;
/// <summary>What a registered module says about itself: its written pages, the permissions it owns and its menu windows.</summary>
internal sealed record ModuleDocumentation( IReadOnlyList<DocumentationPage> Pages, IReadOnlyList<PermissionDescriptor> Permissions,
IReadOnlyList<AdminMenuWindowRow> Windows = null )
{
internal IReadOnlyList<AdminMenuWindowRow> Windows { get; init; } = Windows ?? Array.Empty<AdminMenuWindowRow>();
}