@namespace Lumeo

<div class="@CssClass" @attributes="AdditionalAttributes">
    @if (!string.IsNullOrEmpty(Label))
    {
        <dt class="text-sm text-muted-foreground">@Label</dt>
    }
    <dd class="mt-1 text-sm text-foreground">
        @ChildContent
    </dd>
</div>

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

    private string CssClass => $"p-3 {Class}".Trim();
}
