<span class="tray-hide" data-logged-user="true">
<div class="card prodcard">
	<div class="card-body" >
		<table class="table table-sm table-hover ">
  <thead>
    <tr class="row small">
      <th class="col-xs-2 col-sm-2 col-md-2 col-lg-2">Código</th>
      <th class="col-xs-2 col-sm-2 col-md-2 col-lg-2">Nome</th>
      <th class="col-xs-7 col-sm-5 col-md-5 col-lg-4">E-mail</th>
      <th class="text-center col-xs-3 col-sm-3 col-md-3 col-lg-4">Ação</th>
    </tr>
  </thead>
  <tbody>
  	<?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      <?php if($user->name <> 'admin'): ?>
      <tr class="row">
		    <td class="col-xs-2 col-sm-2 col-md-2 col-lg-2"><?php echo e($user->id); ?> </td>
		    <td class="col-xs-2 col-sm-2 col-md-2 col-lg-2"><?php echo e($user->name); ?></td>
		    <td class="col-xs-5 col-sm-5 col-md-5 col-lg-4"><?php echo e($user->email); ?>

          <?php if(Auth::user()->name === $user->name): ?>
            <span class="right badge badge-danger" >Logado</span>
          <?php endif; ?>
        </td>
		    <td class="text-center col-xs-3 col-sm-3 col-md-3 col-lg-4">
		    	<button class="btn btn-sm btn-outline-success col-lg-4 col-md-6 col-sm-12" type="button" data-bs-toggle="modal" data-bs-target="#modalEditar<?php echo e($user->id); ?>">Editar</button>
          <button class="btn btn-sm btn-outline-danger col-lg-4 col-md-6 col-sm-12" type="button" data-bs-toggle="modal" data-bs-target="#modalDel<?php echo e($user->id); ?>">Deletar</button>
		    </td>
		  </tr>
      <?php endif; ?>
      
      <?php echo $__env->make('painel._includes.modalEditarUser', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
      
				<div class="modal fade" id="modalDel<?php echo e($user->id); ?>" tabindex="-1" role="dialog" aria-labelledby="modalDel.<?php echo e($user->id); ?>" aria-hidden="true">
					  <div class="modal-dialog modal-dialog" role="document">
					    <div class="modal-content">
					      <div class="modal-header text-center">
					        <h5 class="text-center">Deseja realmente excluir este usuário?</h5>
					      </div>
		            <div class=" modal-footer align-content-center">
		              <button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
		              <button type="button" class="btn btn-danger " onclick="location.href = '<?php echo e(route('admin.deleteUser',$user->id  )); ?>'" >Excluir</button>
		            </div>
					    </div>
					  </div>
					</div>
  	<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  </tbody>
</table>
    <hr>
    <button type="button" class="btn btn-primary" data-bs-toggle="modal"data-bs-target="#modalAddUser">
      Novo Usuário
    </button>





	</div>
	</div>

<script src="<?php echo e(asset('site/jquery.js')); ?>"></script>
<script type="text/javascript">

  $('#v-pills-btn8-tab').addClass("active");
  $('#v-pills-btn1-tab').removeClass("active");

</script>

<?php echo $__env->make('painel._includes.modalAddUser', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH C:\projects\lara\projectwix\resources\views/painel/_includes/_buttons/usuarios.blade.php ENDPATH**/ ?>