<div>
     <?php $__env->slot('header', null, []); ?> 
        <h2 class="text-xl font-semibold leading-tight text-gray-800">
            Sitios
        </h2>
     <?php $__env->endSlot(); ?>

    <div class="py-6">
        <div class="mx-auto max-w-8xl sm:px-6 lg:px-8 mt-2">

            <!--[if BLOCK]><![endif]--><?php if(session()->has('success')): ?>
                <div class="mb-4 rounded bg-green-100 px-4 py-2 text-green-700">
                    <?php echo e(session('success')); ?>

                </div>
            <?php endif; ?><!--[if ENDBLOCK]><![endif]-->

            
            <div class="mb-4 flex justify-end">
                <a href="<?php echo e(route('sites.create')); ?>"
                   class="rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700">
                    Nuevo sitio
                </a>
            </div>

            
            <div class="overflow-hidden rounded bg-white shadow">
                <table class="min-w-full text-left text-sm">

                    <thead class="bg-gray-100 text-xs uppercase text-gray-600">
                    <tr>
                        <th class="px-4 py-3">Nombre</th>
                        <th class="px-4 py-3">Dominio</th>
                        <th class="px-4 py-3">Cliente</th>
                        <th class="px-4 py-3">Tipo</th>
                        <th class="px-4 py-3">Entorno</th>
                        <th class="px-4 py-3">Versión</th>
                        <th class="px-4 py-3">Activo</th>
                        <th class="px-4 py-3 text-right">Acciones</th>
                    </tr>
                    </thead>

                    <tbody class="divide-y">
                    <!--[if BLOCK]><![endif]--><?php $__empty_1 = true; $__currentLoopData = $sites; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $site): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr class="hover:bg-gray-50">
                            <td class="px-4 py-3"><?php echo e($site->name); ?></td>
                            <td class="px-4 py-3"><?php echo e($site->domain); ?></td>
                            <td class="px-4 py-3"><?php echo e($site->client->name ?? '—'); ?></td>
                            <td class="px-4 py-3"><?php echo e($site->type->name ?? '—'); ?></td>
                            <td class="px-4 py-3"><?php echo e($site->env); ?></td>
                            <td class="px-4 py-3"><?php echo e($site->version); ?></td>
                            <td class="px-4 py-3">
                                <!--[if BLOCK]><![endif]--><?php if($site->active): ?>
                                    <span class="text-green-600 font-bold">●</span>
                                <?php else: ?>
                                    <span class="text-red-600 font-bold">●</span>
                                <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                            </td>

                            <td class="px-4 py-3 text-right">
                                <a href="<?php echo e(route('sites.edit', $site)); ?>"
                                   class="text-blue-600 hover:text-blue-800">
                                    Editar
                                </a>
                            </td>
                        </tr>

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="8" class="px-4 py-3 text-center text-gray-500">
                                No hay sitios registrados.
                            </td>
                        </tr>
                    <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    </tbody>

                </table>
            </div>

            
            <div class="mt-4">
                <?php echo e($sites->links()); ?>

            </div>

        </div>
    </div>
</div><?php /**PATH /var/www/html/resources/views/livewire/sites/index.blade.php ENDPATH**/ ?>