@namespace Lumeo

<Sheet @bind-Open="Open">
    <SheetContent Side="SheetContent.SheetSide.Left" Class="@($"w-72 p-0 {Class}".Trim())">
        <div class="flex flex-col gap-2 p-4" @attributes="AdditionalAttributes">
            @ChildContent
        </div>
    </SheetContent>
</Sheet>

@code {
    [Parameter] public RenderFragment? ChildContent { get; set; }
    [Parameter] public bool Open { get; set; }
    [Parameter] public EventCallback<bool> OpenChanged { get; set; }

    [Obsolete("Use Open instead. IsOpen will be removed in a future release.")]
    [Parameter] public bool IsOpen { get => Open; set => Open = value; }

    [Obsolete("Use OpenChanged instead. IsOpenChanged will be removed in a future release.")]
    [Parameter] public EventCallback<bool> IsOpenChanged { get => OpenChanged; set => OpenChanged = value; }

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