@namespace Lumeo

@if (Orientation == SeparatorOrientation.Horizontal && ChildContent != null)
{
    <div class="@($"flex items-center gap-3 {Class}").Trim()" @attributes="AdditionalAttributes">
        <div class="h-px flex-1 bg-border"></div>
        <span class="text-xs text-muted-foreground">@ChildContent</span>
        <div class="h-px flex-1 bg-border"></div>
    </div>
}
else if (Orientation == SeparatorOrientation.Horizontal)
{
    <div role="none" class="@($"shrink-0 bg-border h-px w-full {Class}".Trim())" @attributes="AdditionalAttributes"></div>
}
else
{
    <div role="none" class="@($"shrink-0 bg-border h-full w-px {Class}".Trim())" @attributes="AdditionalAttributes"></div>
}

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

    public enum SeparatorOrientation { Horizontal, Vertical }
}
