@namespace DeepDrftManager.Components.Pages.Tracks @typeparam TRow @using DeepDrftModels.DTOs @* Shared table shell for the single-track medium browsers (Sessions, Mixes). Renders the cover thumbnail, title, artist, and a shared Edit affordance that every medium gets (9.5.E). The medium-specific cells (hero / waveform / generate-or-upload action) are supplied per row via the ActionContent slot, which receives the subclass's typed row. Fully controlled by the parent: loading and row state are passed in. *@ @if (Loading) { } else if (Rows.Count == 0) { @EmptyMessage } else { Cover @TitleHeader Artist Actions @{ var release = ReleaseAccessor(context); } @if (!string.IsNullOrEmpty(release.ImagePath)) {
} else {
}
@ReleaseAccessor(context).Title @ReleaseAccessor(context).Artist @ActionContent(context)
} @code { [Parameter] public required IReadOnlyList Rows { get; set; } [Parameter] public bool Loading { get; set; } /// Projects a row to its underlying release for the cover/title/artist cells. [Parameter] public required Func ReleaseAccessor { get; set; } /// Medium-specific cell content (hero / waveform / generate action) for each row. [Parameter] public required RenderFragment ActionContent { get; set; } /// Relative thumbnail URL builder; the base class supplies its proxy-aware helper. [Parameter] public required Func ThumbUrl { get; set; } /// Column header / data-label for the title column (e.g. "Session", "Mix"). [Parameter] public string TitleHeader { get; set; } = "Title"; [Parameter] public string EmptyMessage { get; set; } = "Nothing here yet."; }