<?php $__env->startSection('titulo','Áreas'); ?>
<?php $__env->startSection('contenido'); ?>
<div class="d-flex flex-wrap justify-content-between align-items-center mb-3">
  <h4 class="mb-0"><i class="fa fa-map-location-dot"></i> Áreas de planta</h4>
  <a href="<?php echo e(route('areas.create')); ?>" class="btn btn-primario"><i class="fa fa-plus"></i> Nueva área</a>
</div>
<form method="GET" class="mb-3">
  <div class="input-group">
    <input name="q" value="<?php echo e($busqueda); ?>" class="form-control" placeholder="Buscar...">
    <button class="btn btn-outline-primary"><i class="fa fa-search"></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>Sistemas</th><th>Equipos</th><th>Activo</th><th></th></tr></thead>
      <tbody>
      <?php $__empty_1 = true; $__currentLoopData = $registros; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $a): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <tr>
          <td><strong><?php echo e($a->codigo); ?></strong></td>
          <td><?php echo e($a->nombre); ?> <small class="text-muted d-block"><?php echo e($a->descripcion); ?></small></td>
          <td><?php echo e($a->sistemas_count); ?></td>
          <td><?php echo e($a->equipos_count); ?></td>
          <td><span class="badge text-bg-<?php echo e($a->activo?'success':'secondary'); ?>"><?php echo e($a->activo?'Sí':'No'); ?></span></td>
          <td class="text-end">
            <a href="<?php echo e(route('areas.edit', $a)); ?>" class="btn btn-sm btn-outline-primary"><i class="fa fa-pen"></i></a>
            <form method="POST" action="<?php echo e(route('areas.destroy',$a)); ?>" 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="6" class="text-center text-muted py-4">Sin áreas</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/areas_index.blade.php ENDPATH**/ ?>