<x-daylight::tables.table>
    <x-slot:columns>
        <th class="p-3 text-left text-sm font-semibold text-gray-900">
            {{ __('Name') }}
        </th>

        <th class="p-3 text-left text-sm font-semibold text-gray-900">
            {{ __('Email') }}
        </th>

        <th class="p-3 text-left text-sm font-semibold text-gray-900">
            {{ __('Phone') }}
        </th>

        <th class="p-3 text-left text-sm font-semibold text-gray-900">
            {{ __('Registered at') }}
        </th>
    </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.users.show', $row) }}">
                    {{ $row->fullName }}
                </a>
            </x-daylight::tables.column>
            <x-daylight::tables.column>
                {{ $row->email }}
            </x-daylight::tables.column>

            <x-daylight::tables.column>
                {{ $row->phone ?? __('N/A') }}
            </x-daylight::tables.column>

            <x-daylight::tables.column>
                {{ $row->created_at->format('d-m-Y H:i') }}
            </x-daylight::tables.column>

            <x-slot:actions>
                <a href="{{ route('daylight.store.orders.show', $row) }}"
                   class="py-0.5 pl-2 pr-1 inline-flex font-medium items-center gap-1 text-sm">
                    {{{ __('View details') }}}
                </a>
            </x-slot:actions>
        </x-daylight::tables.row>
    @endforeach
</x-daylight::tables.table>
