using Khaemhat.Application.Modules;
namespace Khaemhat.Web.Shell;
/// Who may see a menu entry besides module and permission.
public enum MenuAudience
{
/// Everybody with the module and the permission.
Everyone = 0,
/// Only instance accounts (super user and administrators).
InstanceAccounts = 1,
}
/// An entry of the side menu (SPEC §10.2).
/// The text key of the label (Shell.Menu.*) and the identity of the entry.
/// The icon in icons/sprite.svg.
/// The address.
/// The licence module that must be active.
/// The permission needed, or .
/// The milestone that delivers the page, shown while it is not there yet (M4...); once delivered.
/// Who may see it.
public sealed record MenuItem(string Key, string Icon, string Href, string Module, string? Permission, string? Milestone,
MenuAudience Audience = MenuAudience.Everyone)
{
/// The sub-entries shown under the active module or in the pop-up of the collapsed menu.
public IReadOnlyList