@* Thin adapter: maps MxGateway runtime state text → kit StatusPill state.
   The bespoke .chip rendering now lives in the kit; only the app's domain
   text→state vocabulary remains here. Call sites (<StatusBadge Text="..."/>) unchanged. *@
<StatusPill State="MapState(Text)">@Text</StatusPill>
@code {
    [Parameter] public string? Text { get; set; }

    private static StatusState MapState(string? text) => text switch
    {
        "Ready" or "Healthy" or "Active" => StatusState.Ok,
        "Creating" or "StartingWorker" or "WaitingForPipe" or "InitializingWorker" or "Closing"
            or "Stale" or "Degraded" or "Expiring" => StatusState.Warn,
        "Faulted" or "Unavailable" or "Expired" => StatusState.Bad,
        _ => StatusState.Idle,
    };
}
