<?php $__env->startSection('header_title', 'Minhas Aparelhagens'); ?>
<?php $__env->startSection('header_subtitle', 'Câmeras e equipamentos associados às suas instalações.'); ?>

<?php $__env->startSection('content'); ?>
    <div class="space-y-6">
        <?php $__empty_1 = true; $__currentLoopData = $installations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $installation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <section class="bg-slate-900 border border-white/5 rounded-2xl overflow-hidden shadow-xl">
                <div class="px-6 py-5 border-b border-white/5 flex flex-col md:flex-row md:items-center md:justify-between gap-3">
                    <div>
                        <h3 class="text-lg font-semibold text-white"><?php echo e($installation->address); ?></h3>
                        <p class="text-sm text-slate-500">Estado: <?php echo e($installation->status); ?> · <?php echo e($installation->installation_date?->format('d/m/Y') ?? 'Data por definir'); ?></p>
                    </div>
                    <span class="px-3 py-1 rounded-full text-xs font-semibold bg-blue-500/10 text-blue-400">
                        <?php echo e($installation->cameras->count() + $installation->devices->count()); ?> item(ns)
                    </span>
                </div>

                <div class="grid grid-cols-1 xl:grid-cols-2 gap-0">
                    <div class="p-6 border-b xl:border-b-0 xl:border-r border-white/5">
                        <h4 class="text-sm font-semibold uppercase tracking-wider text-slate-400 mb-4">Câmeras</h4>
                        <div class="space-y-3">
                            <?php $__empty_2 = true; $__currentLoopData = $installation->cameras; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $camera): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_2 = false; ?>
                                <div class="flex items-center justify-between rounded-xl bg-slate-950/60 border border-white/5 px-4 py-3">
                                    <div>
                                        <p class="text-white font-medium"><?php echo e($camera->name); ?></p>
                                        <p class="text-xs text-slate-500"><?php echo e($camera->model ?? 'Sem modelo'); ?> · <?php echo e($camera->ip_address ?? 'Sem IP'); ?></p>
                                    </div>
                                    <span class="text-xs font-semibold text-slate-300"><?php echo e($camera->status); ?></span>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_2): ?>
                                <p class="text-sm text-slate-500">Nenhuma câmera registada nesta instalação.</p>
                            <?php endif; ?>
                        </div>
                    </div>

                    <div class="p-6">
                        <h4 class="text-sm font-semibold uppercase tracking-wider text-slate-400 mb-4">Equipamentos</h4>
                        <div class="space-y-3">
                            <?php $__empty_2 = true; $__currentLoopData = $installation->devices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $device): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_2 = false; ?>
                                <div class="flex items-center justify-between rounded-xl bg-slate-950/60 border border-white/5 px-4 py-3">
                                    <div>
                                        <p class="text-white font-medium"><?php echo e($device->name); ?></p>
                                        <p class="text-xs text-slate-500"><?php echo e($device->type); ?> · Série: <?php echo e($device->serial_number ?? '---'); ?></p>
                                    </div>
                                    <span class="text-xs font-semibold text-slate-300"><?php echo e($device->status); ?></span>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_2): ?>
                                <p class="text-sm text-slate-500">Nenhum equipamento registado nesta instalação.</p>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </section>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <div class="p-10 rounded-2xl border border-dashed border-white/10 text-center">
                <p class="text-slate-500">Ainda não existem aparelhagens associadas à sua conta.</p>
            </div>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>

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