<span class="@BuildCssClass()">
    @ChildContent
</span>

@code {
    [Parameter]
    public RenderFragment? ChildContent { get; set; }

    [Parameter]
    public string Tone { get; set; } = "neutral";

    [Parameter]
    public string? CssClass { get; set; }

    private string BuildCssClass()
    {
        var classes = new List<string> { "ui-status-chip", $"is-{Tone.Trim().ToLowerInvariant()}" };
        if (!string.IsNullOrWhiteSpace(CssClass))
        {
            classes.Add(CssClass);
        }

        return string.Join(' ', classes);
    }
}
