@namespace Lumeo

<div class="@CssClass" @attributes="AdditionalAttributes">
    @if (Heading is not null)
    {
        <div class="px-2 py-1.5 text-xs font-medium text-muted-foreground">@Heading</div>
    }
    @ChildContent
</div>

@code {
    [Parameter] public RenderFragment? ChildContent { get; set; }
    [Parameter] public string? Heading { get; set; }
    [Parameter] public string? Class { get; set; }
    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }

    private string CssClass => $"overflow-hidden p-1 text-foreground {Class}".Trim();
}
