@namespace DeepDrftPublic.Client.Controls @using DeepDrftPublic.Client.Services @implements IDisposable @inject WaveformVisualizerControlState State @* Theater-Mode toggle (Phase 20 §3). The single affordance placed identically on all three release detail pages — immediately to the LEFT of the lava-lamp WaveformVisualizerControlPopover trigger. It is purely a mutation surface: tapping it flips State.TheaterMode and raises Changed; the detail pages observe that to gate their content @if, and the player bar observes it to grow. This component reaches into no page and no bar — single source, multiple observers (§6). Visible only when the lava OR waveform subsystem is on — there is nothing to go to theater FOR if both are off (§3.2). Disabled until interactive (§3.4), the same prerender guard the lava/Play buttons use. Active visual state when Theater is ON. .dd-accent-icon gives the green-accent glyph in both themes with zero new CSS (§8) — same treatment as the lava-lamp trigger it sits beside. *@ @if (State.LavaEnabled || State.WaveformEnabled) {
} @code { /// Trigger-icon size. Defaults Large to match the lava-lamp popover trigger it sits beside. [Parameter] public Size IconSize { get; set; } = Size.Large; protected override void OnInitialized() => State.Changed += OnStateChanged; // The toggle's own visibility and active state both key off State, which another observer (or this // button) may mutate, so re-render on every Changed — same idempotent posture the visualizer bridge uses. private void OnStateChanged() => InvokeAsync(StateHasChanged); private void Toggle() { State.TheaterMode = !State.TheaterMode; State.NotifyChanged(); } public void Dispose() => State.Changed -= OnStateChanged; }