@props([
    'title' => null,
])

<section {{ $attributes->merge(['class' => 'tw-card']) }}>
    @if ($title || isset($filters))
        <div class="flex flex-wrap items-end justify-between gap-3 border-b border-[var(--color-border)] px-4 py-3">
            @if ($title)
                <h2 class="text-sm font-semibold text-[var(--color-text)]">{{ $title }}</h2>
            @else
                <span></span>
            @endif

            @isset($filters)
                <div class="flex flex-wrap items-end gap-2">
                    {{ $filters }}
                </div>
            @endisset
        </div>
    @endif

    <div class="p-0">
        {{ $table ?? $slot }}
    </div>
</section>
