@* Components/StatusPill.razor *@
@namespace ZB.MOM.WW.Theme
<span class="chip @ChipClass">@ChildContent</span>

@code {
    /// <summary>
    /// Status the chip represents. Mapped to a token-based <c>.chip-*</c> class
    /// (e.g. <see cref="StatusState.Ok"/> → <c>chip-ok</c>). Required.
    /// </summary>
    [Parameter, EditorRequired] public StatusState State { get; set; }

    /// <summary>Chip label content (e.g. the status text).</summary>
    [Parameter] public RenderFragment? ChildContent { get; set; }

    private string ChipClass => State switch
    {
        StatusState.Ok   => "chip-ok",
        StatusState.Warn => "chip-warn",
        StatusState.Bad  => "chip-bad",
        StatusState.Info => "chip-info",
        _                => "chip-idle",
    };
}
