@namespace Lumeo

<div class="@CssClass" @attributes="AdditionalAttributes">
    @for (var i = 0; i < Lines; i++)
    {
        <Skeleton Animation="Animation" Class="@($"h-4 {(i == Lines - 1 ? "w-3/4" : "w-full")}")" />
    }
</div>

@code {
    [Parameter] public int Lines { get; set; } = 3;
    [Parameter] public Skeleton.SkeletonAnimation Animation { get; set; } = Skeleton.SkeletonAnimation.Pulse;
    [Parameter] public string? Class { get; set; }
    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }

    private string CssClass => $"space-y-2 {Class}".Trim();
}
