@using DeepDrftModels.Enums @inject NavigationManager Navigation @* Release Archive: one card per ReleaseMedium, driven off Enum.GetValues + a display-metadata table. No hardcoded three-arm switch in markup — adding a medium surfaces a new card automatically and only needs one new entry in MediumCards below. Card idiom mirrors CmsGenreBrowser (MudCard + swatch). *@ @foreach (var medium in Enum.GetValues()) { var info = MediumCards[medium];
@info.Label @info.Descriptor
}
@code { private sealed record MediumCardInfo(string Label, string Descriptor, string SwatchModifier, string Route); // The one place medium → display + navigation target lives. A future medium adds one entry here; // the markup above is untouched. The enum→record dictionary is a switch, data-structured (§3.1). private static readonly IReadOnlyDictionary MediumCards = new Dictionary { [ReleaseMedium.Cut] = new("Cuts", "Studio singles, EPs, and albums", "cut", "/tracks/albums"), [ReleaseMedium.Session] = new("Sessions", "Single-track live recordings", "session", "/tracks/sessions"), [ReleaseMedium.Mix] = new("Mixes", "Single-track DJ mixes", "mix", "/tracks/mixes"), }; }