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

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

            <div class="mb-4 flex items-center justify-between">
                <div class="w-1/3">
                    <input
                        type="text"
                        wire:model.live.debounce.300ms="search"
                        placeholder="Buscar permiso..."
                        class="w-full rounded border px-3 py-2"
                    >
                </div>

                <a href="<?php echo e(route('permissions.create')); ?>"
                   class="rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700">
                    Crear permiso
                </a>
            </div>

            <div class="bg-white shadow rounded p-6">

                <table class="min-w-full text-sm">
                    <thead>
                    <tr class="border-b text-left font-semibold">
                        <th class="px-3 py-2">ID</th>
                        <th class="px-3 py-2">Nombre</th>
                        <th class="px-3 py-2">Módulo</th>
                        <th class="px-3 py-2">Descripción</th>
                        <th class="px-3 py-2">Creado</th>
                        <th class="px-3 py-2">Actualizado</th>
                        <th class="px-3 py-2 text-right">Acciones</th>
                    </tr>
                    </thead>

                    <tbody>
                    <!--[if BLOCK]><![endif]--><?php $__empty_1 = true; $__currentLoopData = $permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $perm): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr class="border-b hover:bg-gray-50">
                            <td class="px-3 py-2"><?php echo e($perm->id); ?></td>

                            <td class="px-3 py-2 font-mono text-blue-700">
                                <?php echo e($perm->name); ?>

                            </td>

                            <td class="px-3 py-2">
                                <?php echo e($perm->model ?? '—'); ?>

                            </td>

                            <td class="px-3 py-2">
                                <?php echo e($perm->description ?? '—'); ?>

                            </td>

                            <td class="px-3 py-2 text-gray-500">
                                <?php echo e($perm->created_at->format('Y-m-d')); ?>

                            </td>

                            <td class="px-3 py-2 text-gray-500">
                                <?php echo e($perm->updated_at->format('Y-m-d')); ?>

                            </td>

                            <td class="px-3 py-2 text-right">
                                <a href="<?php echo e(route('permissions.edit', $perm)); ?>"
                                   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="7" class="py-4 text-center text-gray-500">
                                No se encontraron permisos.
                            </td>
                        </tr>
                    <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    </tbody>
                </table>

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

                </div>

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