@namespace DeepDrftPublic.Client.Controls
@using DeepDrftModels.DTOs
@* The docked player's queue panel: a screen-centered, mostly-square modal hosting the editable
QueueList (Phase 17 §3.2). The overlay shell, dismissal, and drag-safety are a direct lift of
WaveformVisualizerControlPopover (Phase 15 §4):
- MudOverlay (DarkBackground = mild tint, Modal = focus/scroll stay on the panel).
- Scrim OnClick closes; the panel stops click propagation so an inside click is not a dismissal.
- AutoClose left OFF; dismissal is the explicit scrim click only. A MudDropContainer drag that
ends outside the panel does not synthesise a click on the scrim, so a reorder drag never
dismisses (same drag-safety posture as the visualizer popover).
This host owns NO queue state and NO JS interop — it renders Items/CurrentIndex and forwards
QueueList's reorder/remove/jump callbacks plus a Clear action to the parent (AudioPlayerBar), which
holds the cascaded IQueueService. Purely presentational; prerender-safe. *@
@code {
/// Whether the overlay is shown. Owned by the parent (the Queue button toggles it).
[Parameter] public bool Visible { get; set; }
/// The queue to render. Passed straight through to .
[Parameter] public IReadOnlyList? Items { get; set; }
/// Index of the current track within , or -1 when none.
[Parameter] public int CurrentIndex { get; set; } = -1;
/// Raised when the scrim is clicked to dismiss the overlay.
[Parameter] public EventCallback OnClose { get; set; }
/// Raised when Clear is pressed — empties the up-next, keeping the current track playing.
[Parameter] public EventCallback OnClear { get; set; }
/// Reorder callback forwarded from the hosted .
[Parameter] public EventCallback<(int FromIndex, int ToIndex)> OnReorder { get; set; }
/// Remove callback forwarded from the hosted .
[Parameter] public EventCallback OnRemove { get; set; }
/// Jump-to-track callback forwarded from the hosted .
[Parameter] public EventCallback OnJump { get; set; }
// Clear is meaningful only when there is something beyond the current track to discard.
private bool CanClear => Items is { Count: > 1 };
}