@php
    $classes = [
        'table-auto w-full text-left',
        $attributes->get('bordered', true) ? 'border border-gray-200' : '',
        $attributes->get('striped') ? 'divide-y divide-gray-100' : '',
        $attributes->get('size') === 'sm' ? 'text-sm' : 'text-base',
    ];
@endphp

<div class="overflow-x-auto">
    <table {{ $attributes->except(['bordered', 'striped', 'size'])->merge(['class' => implode(' ', $classes)]) }}>
        @isset($header)
            <thead class="bg-gray-100 text-gray-700">
                {{ $header }}
            </thead>
        @endisset
        <tbody>
            {{ $slot }}
        </tbody>
    </table>

    @isset($footer)
        <div class="mt-2">
            {{ $footer }}
        </div>
    @endisset
</div>