<div>
     <?php $__env->slot('header', null, []); ?> 
        <h2 class="text-xl font-semibold leading-tight text-gray-800">
            Tipos de plataforma
        </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 items-center justify-between">
                <div class="w-1/3">
                    <input
                        type="text"
                        wire:model.live.debounce.300ms="search"
                        placeholder="Buscar tipo..."
                        class="w-full rounded border px-3 py-2"
                    >
                </div>

                <a href="<?php echo e(route('types.create')); ?>"
                   class="rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700">
                    Nuevo tipo
                </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">Shortname</th>
                        <th class="px-4 py-3">Descripción</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 = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr class="hover:bg-gray-50">
                            <td class="px-4 py-3"><?php echo e($type->name); ?></td>
                            <td class="px-4 py-3"><?php echo e($type->shortname); ?></td>
                            <td class="px-4 py-3"><?php echo e($type->description ?? '—'); ?></td>

                            <td class="px-4 py-3 text-right">
                                <a href="<?php echo e(route('types.edit', $type)); ?>"
                                   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="4" class="px-4 py-3 text-center text-gray-500">
                                No hay tipos registrados.
                            </td>
                        </tr>
                    <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    </tbody>

                </table>
            </div>

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

            </div>

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