<span class="chip @CssClass">@Text</span>

@code {
    [Parameter]
    public string? Text { get; set; }

    private string CssClass => Text switch
    {
        "Ready" or "Healthy" or "Active" => "chip-ok",
        "Creating" or "StartingWorker" or "WaitingForPipe" or "InitializingWorker" or "Closing" => "chip-warn",
        "Stale" or "Degraded" => "chip-warn",
        "Faulted" or "Unavailable" => "chip-bad",
        "Closed" or "Revoked" or "Unknown" => "chip-idle",
        _ => "chip-idle"
    };
}
