@* A collapsible sidebar nav section. The header is a full-width button that
toggles ChildContent visibility. Pattern lifted from ScadaLink CentralUI
(Components/Layout/NavSection.razor) — see [[project-deployed-service]]. *@
@if (Expanded)
{
@ChildContent
}
@code {
/// Section label shown in the header (e.g. "Runtime").
[Parameter, EditorRequired]
public string Title { get; set; } = string.Empty;
/// Whether the section is expanded — its items rendered.
[Parameter]
public bool Expanded { get; set; }
/// Raised when the header button is clicked.
[Parameter]
public EventCallback OnToggle { get; set; }
/// The section's nav items, rendered only while expanded.
[Parameter]
public RenderFragment? ChildContent { get; set; }
}