<?php $__env->startSection('titulo','Equipos'); ?>
<?php $__env->startSection('contenido'); ?>
<div class="d-flex flex-wrap justify-content-between align-items-center mb-3">
  <h4><i class="fa fa-gear"></i> Equipos</h4>
  <a href="<?php echo e(route('equipos.create')); ?>" class="btn btn-primario"><i class="fa fa-plus"></i> Nuevo</a>
</div>
<form method="GET" class="row g-2 mb-3">
  <div class="col-md-3"><input name="q" value="<?php echo e($busqueda); ?>" class="form-control" placeholder="Buscar..."></div>
  <div class="col-md-3"><select name="area_id" class="form-select"><option value="">— Área —</option>
    <?php $__currentLoopData = $areas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $a): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($a->id); ?>" <?php if($area_id==$a->id): echo 'selected'; endif; ?>><?php echo e($a->nombre); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  </select></div>
  <div class="col-md-3"><select name="sistema_id" class="form-select"><option value="">— Sistema —</option>
    <?php $__currentLoopData = $sistemas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($s->id); ?>" <?php if($sistema_id==$s->id): echo 'selected'; endif; ?>><?php echo e($s->nombre); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  </select></div>
  <div class="col-md-2"><button class="btn btn-outline-primary w-100"><i class="fa fa-filter"></i></button></div>
</form>
<div class="card"><div class="table-responsive"><table class="table table-hover mb-0">
<thead><tr><th>Código</th><th>Nombre</th><th>Área</th><th>Sistema</th><th>Comp.</th><th>OT</th><th>Activo</th><th></th></tr></thead><tbody>
<?php $__empty_1 = true; $__currentLoopData = $registros; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $e): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
  <td><strong><?php echo e($e->codigo); ?></strong></td>
  <td><?php echo e($e->nombre); ?></td>
  <td><?php echo e(optional($e->area)->nombre); ?></td>
  <td><?php echo e(optional($e->sistema)->nombre); ?></td>
  <td><?php echo e($e->componentes_count); ?></td>
  <td><?php echo e($e->ordenes_count); ?></td>
  <td><span class="badge text-bg-<?php echo e($e->activo?'success':'secondary'); ?>"><?php echo e($e->activo?'Sí':'No'); ?></span></td>
  <td class="text-end">
    <a href="<?php echo e(route('equipos.edit',$e)); ?>" class="btn btn-sm btn-outline-primary"><i class="fa fa-pen"></i></a>
    <form method="POST" action="<?php echo e(route('equipos.destroy',$e)); ?>" class="d-inline" onsubmit="return confirm('¿Eliminar?');">
      <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?><button class="btn btn-sm btn-outline-danger"><i class="fa fa-trash"></i></button></form>
  </td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <tr><td colspan="8" class="text-muted text-center py-4">Sin equipos</td></tr> <?php endif; ?>
</tbody></table></div></div>
<div class="mt-2"><?php echo e($registros->links()); ?></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\mto\resources\views/catalogos/equipos_index.blade.php ENDPATH**/ ?>