<?php $__env->startSection('header_title', 'Equipamentos e Câmeras'); ?>
<?php $__env->startSection('header_subtitle', 'Inventário técnico associado às instalações dos clientes.'); ?>

<?php $__env->startSection('content'); ?>
    <div class="flex justify-end mb-8">
        <a href="<?php echo e(route('admin.equipment.create')); ?>" class="inline-flex items-center justify-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white text-sm font-semibold rounded-xl shadow-lg shadow-blue-500/20 transition-all">
            <svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
            </svg>
            Novo Equipamento
        </a>
    </div>

    <?php if(session('success')): ?>
        <div class="mb-6 p-4 rounded-xl bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-sm"><?php echo e(session('success')); ?></div>
    <?php endif; ?>

    <div class="grid grid-cols-1 xl:grid-cols-2 gap-6">
        <section class="bg-slate-900 border border-white/5 rounded-2xl overflow-hidden shadow-xl">
            <div class="px-6 py-4 border-b border-white/5">
                <h3 class="text-lg font-semibold text-white">Câmeras</h3>
            </div>
            <div class="overflow-x-auto">
                <table class="w-full text-left text-sm">
                    <thead class="bg-slate-950/50 text-xs font-semibold uppercase tracking-wider text-slate-400">
                        <tr><th class="px-6 py-4">Nome</th><th class="px-6 py-4">Instalação</th><th class="px-6 py-4">IP</th><th class="px-6 py-4">Estado</th></tr>
                    </thead>
                    <tbody class="divide-y divide-white/5">
                        <?php $__empty_1 = true; $__currentLoopData = $cameras; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $camera): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr class="hover:bg-slate-800/50">
                                <td class="px-6 py-4 text-white"><?php echo e($camera->name); ?><p class="text-xs text-slate-500"><?php echo e($camera->model ?? 'Sem modelo'); ?></p></td>
                                <td class="px-6 py-4"><?php echo e($camera->installation->address ?? 'Sem instalação'); ?></td>
                                <td class="px-6 py-4"><?php echo e($camera->ip_address ?? '---'); ?></td>
                                <td class="px-6 py-4"><?php echo e($camera->status); ?></td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr><td colspan="4" class="px-6 py-10 text-center text-slate-500">Nenhuma câmera registada.</td></tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
            <div class="px-6 py-4 border-t border-white/5"><?php echo e($cameras->links()); ?></div>
        </section>

        <section class="bg-slate-900 border border-white/5 rounded-2xl overflow-hidden shadow-xl">
            <div class="px-6 py-4 border-b border-white/5">
                <h3 class="text-lg font-semibold text-white">Equipamentos</h3>
            </div>
            <div class="overflow-x-auto">
                <table class="w-full text-left text-sm">
                    <thead class="bg-slate-950/50 text-xs font-semibold uppercase tracking-wider text-slate-400">
                        <tr><th class="px-6 py-4">Nome</th><th class="px-6 py-4">Tipo</th><th class="px-6 py-4">Série</th><th class="px-6 py-4">Estado</th></tr>
                    </thead>
                    <tbody class="divide-y divide-white/5">
                        <?php $__empty_1 = true; $__currentLoopData = $devices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $device): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr class="hover:bg-slate-800/50">
                                <td class="px-6 py-4 text-white"><?php echo e($device->name); ?><p class="text-xs text-slate-500"><?php echo e($device->installation->address ?? 'Sem instalação'); ?></p></td>
                                <td class="px-6 py-4"><?php echo e($device->type); ?></td>
                                <td class="px-6 py-4"><?php echo e($device->serial_number ?? '---'); ?></td>
                                <td class="px-6 py-4"><?php echo e($device->status); ?></td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr><td colspan="4" class="px-6 py-10 text-center text-slate-500">Nenhum equipamento registado.</td></tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
            <div class="px-6 py-4 border-t border-white/5"><?php echo e($devices->links()); ?></div>
        </section>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\secure-vision-app\resources\views\admin\equipment\index.blade.php ENDPATH**/ ?>