<?php echo csrf_field(); ?>
<div class='row' >
  <div class="col-md-12 col-sm-12  ">
    <div class="x_panel">
      <div class="x_title">
        <h2>Consulta por Departamento(s)</h2>
        <div class="clearfix"></div>
      </div>
      <?php $depto = json_decode(session('departamento')); ?>
      <div class="x_content">
        <nav class="navbar navbar-expand-lg navbar-dark bg-dark-blue">
          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
          </button>
          <div class="collapse navbar-collapse" id="navbarTogglerDemo01">
            
            <form class="form-horizontal" style="width: 100%;" action="javascript:poa_consulta();" id='filtro'>
              <div class="row">
                
                <div class="col-md-<?php echo e(($departamentos->count()>1) ? '2': '4'); ?> col-sm-12"></div>
                <?php if($departamentos->count()>1): ?>
                  <div class="col-md-4 col-sm-12">
                    <input type="hidden" id='filtro_depto' name="filtro_depto" value="<?php echo e($depto->id); ?>">
                    <input type="search" id='filtro_departamento_nombre' name="filtro_departamento_nombre" list='deptos' class="form-control form-control-sm" placeholder="Departamento" value="<?php echo e($depto->nombre); ?>" autocomplete="off">
                    <datalist id='deptos'>
                      <?php $__currentLoopData = $departamentos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $d): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option data-id='<?php echo e($d->id); ?>'><?php echo e($d->nombre); ?></option>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </datalist>
                  </div>
                <?php else: ?>
                    <input type="hidden" name='filtro_depto' id='filtro_depto' value="<?php echo e($departamentos[0]->id); ?>" />
                    <input type="hidden" name='filtro_depto' id='filtro_depto' value="<?php echo e($departamentos[0]->id); ?>" />
                <?php endif; ?>

                  
                
                <div class="col-md-3 col-sm-12">
                  <select class="form-control form-control-sm" name="filtro_anio" id='filtro_anio' required>
                    <option value="">.:Año:.</option>
                    <option value='2020' >2020</option>
                    <option value='2021' >2021</option>
                    <option value='2022' selected>2022</option>
                  </select>
                </div>

                <div class="col-md-2 col-sm-12">
                  <button class="btn btn-outline-info btn-sm" type="submit" data-toggle="tooltip" data-placement="left" title="Buscar"><span class="fa fa-search"></span></button>
                  <button class="btn btn-outline-light btn-sm" type="reset"><span class="fa fa-undo" data-toggle="tooltip" data-placement="left" title="Limpiar"></span></button>
                </div>
                <div class="col-md-1 col-sm-12"></div>

              </div>
            </form>
          </div>
        </nav>
        
        <div class="x_content" id='poa-consulta'></div>

      </div>
    </div>
  </div>
</div>


<?php /**PATH /home/itzitacu/public_html/poa/laravel/resources/views/poa/listado.blade.php ENDPATH**/ ?>