<x-daylight::tables.table>
    <x-slot:columns>
        <x-daylight::tables.sortable-column field="name">
            {{ __('daylight::general.name') }}
        </x-daylight::tables.sortable-column>

        <th class="p-3 text-left text-sm font-semibold text-gray-900">
            {{ __('daylight::general.status') }}
        </th>

        <x-daylight::tables.sortable-column field="created_at">
            {{ __('daylight::general.created_at') }}
        </x-daylight::tables.sortable-column>
    </x-slot:columns>

    @foreach ($this->rows as $row)
        <x-daylight::tables.row wire:key="{{ $row->id }}" :$row>
            <x-daylight::tables.column class="flex items-center">
                <a href="{{ route('daylight.store.customer-groups.edit', $row) }}">
                    {{ $row->name }}
                </a>
            </x-daylight::tables.column>

            <x-daylight::tables.column>
                <x-daylight::badge :class="$row->status->adminColor()">
                    {{ $row->status->label() }}
                </x-daylight::badge>
            </x-daylight::tables.column>

            <x-daylight::tables.column>
                {{ $row->created_at->isoFormat('LLL') }}
            </x-daylight::tables.column>

            <x-slot:actions>
                <x-daylight::tables.row-actions
                    :edit-url="route('daylight.store.customer-groups.edit', $row)"
                    :can-duplicate="false"
                    :can-delete="true"
                    :row-id="$row->id"
                />
            </x-slot:actions>
        </x-daylight::tables.row>
    @endforeach
</x-daylight::tables.table>
