<div class="wrapper">
   <!-- TOPO -->
   <div class="navbar">
      <div class="navbar-content">
         <div class="user-info">
            <a href="<?php echo e(route('admin.photo')); ?>">
               <img src="<?php echo e(asset(auth()->user()->photo)); ?>" alt="" class="profile-pic">
            </a>
            <span>Olá, <a href="<?php echo e(route('admin.profile')); ?>"
                  class="usarname-link"><?php echo e(auth()->user()->firstName); ?></a></span>
         </div>

         <!-- Botão do menu para telas pequenas -->
         <button id="mobile-menu-btn" class="mobile-menu-btn" aria-label="Abrir menu">
            <i class="fa-solid fa-bars"></i>
         </button>

         <a href="<?php echo e(route('admin.logout')); ?>" class="logout-btn" title="Sair">
            <i class='bx bx-log-out'></i>
         </a>
      </div>
   </div>

   <!-- SIDEBAR -->
   <div class="sidebar closed py-3 pt-4">
      <div class="toggle-btn" id="btn">
         <i class="fa-solid fa-bars icon-bars"></i>
         <i class="fa-solid fa-xmark icon-close"></i>
      </div>
      <ul class="nav-list">

         <?php

            $array_menu = [
               [
                  "route" => 'admin.dashboard',
                  "fontawesome" => '<i class="bx bx-grid-alt"></i>',
                  "nameButton" => "Painel Administrativo",
                  "permission" => "ADMIN",
                  "divider" => null,
               ],
               [
                  "route" => 'admin.contaAngra.index',
                  "fontawesome" => '<i class="fa-regular fa-user"></i>',
                  "nameButton" => "Conta Angra",
                  "permission" => "GUEST",
                  "divider" => "<hr>",
               ],
               [
                  "route" => 'paginas.home',
                  "fontawesome" => '<i class="fa-solid fa-house"></i>',
                  "nameButton" => __("Portal"),
                  "permission" => "GUEST",
                  "divider" => null,
               ],
               [
                  "route" => 'admin.photo',
                  "fontawesome" => '<i class="fa-solid fa-images"></i>',
                  "nameButton" => "Alterar Foto",
                  "permission" => "GUEST",
                  "divider" => null
               ],
               [
                  "route" => 'admin.password',
                  "fontawesome" => '<i class="fa-solid fa-key"></i>',
                  "nameButton" => "Alterar Senha",
                  "permission" => "GUEST",
                  "divider" => null
               ],
               [
                  "route" => 'admin.perfilEnderecos.index',
                  "fontawesome" => '<i class="fa-solid fa-location-dot"></i>',
                  "nameButton" => "Alterar Endereço",
                  "permission" => "GUEST",
                  "divider" => null
               ],
               [
                  "route" => 'admin.profile',
                  "fontawesome" => '<i class="fa-regular fa-id-badge"></i>',
                  "nameButton" => "Perfil",
                  "permission" => "GUEST",
                  "divider" => null
               ],
               [
                  "route" => (Auth::user()->govbr_sub != null) ? 'admin.logout.govbr' : 'admin.logout',
                  "fontawesome" => '<i class="bx bx-log-out text-white"></i>',
                  "nameButton" => "Sair",
                  "permission" => "GUEST",
                  "divider" => null
               ],
            ]


         ?>

         <?php $__empty_1 = true; $__currentLoopData = $array_menu; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $menu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <?php echo $__env->make('components/lists/_liLinkMenu', $menu, array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <li>Nenhum menu encontrado</li>
         <?php endif; ?>


      </ul>
   </div>

   <!-- CONTEÚDO -->
   <div class="main-content">
      <?php
         $PesquisaSatisfacaoService = new \App\Http\Services\Accounts\Chamados\ChamadoPesquisaSatisfacaoService();
         $chamadosComPesquisaPendente = $PesquisaSatisfacaoService->getChamadosComPesquisaPendente();
      ?>

      <?php if($chamadosComPesquisaPendente->count() > 0): ?>
         <div class="container-fluid px-3 py-2">
            <div class="alert alert-warning border-0 shadow-sm mb-3 mb-md-4" role="alert">
               <div class="d-flex align-items-start">
                  <div class="flex-shrink-0">
                     <div class="bg-warning bg-opacity-25 rounded-circle d-flex align-items-center justify-content-center p-3">
                        <i class="fa-solid fa-star text-warning fs-5"></i>
                     </div>
                  </div>
                  <div class="flex-grow-1 ms-3">
                     <div class="d-flex align-items-center justify-content-between mb-2">
                        <h5 class="alert-heading mb-0 fw-bold text-danger">
                           <i class="fa-solid fa-bell text-danger me-2"></i>
                           <?php echo e(__("Pesquisa de Satisfação Pendente")); ?>

                        </h5>
                        <span class="badge bg-warning text-dark rounded-pill">
                           <?php echo e($chamadosComPesquisaPendente->count()); ?>

                        </span>
                     </div>
                     <p class="mb-3 text-dark">
                        <?php if($chamadosComPesquisaPendente->count() == 1): ?>
                           <i class="fa-solid fa-info-circle me-2"></i>
                           <?php echo e(__("Você possui 1 chamado finalizado aguardando sua avaliação.")); ?>

                        <?php else: ?>
                           <i class="fa-solid fa-info-circle me-2"></i>
                           <?php echo e(__("Você possui :count chamados finalizados aguardando sua avaliação.", ['count' => $chamadosComPesquisaPendente->count()])); ?>

                        <?php endif; ?>
                     </p>
                     <div class="d-flex flex-wrap gap-2">
                        <?php $__currentLoopData = $chamadosComPesquisaPendente; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $chamado): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                           <a href="<?php echo e(route('admin.contaAngra.chamados.pesquisa-satisfacao.show', $chamado->id)); ?>"
                              class="btn btn-warning btn-sm d-inline-flex align-items-center">
                              <i class="fa-solid fa-star me-2"></i>
                              <span><?php echo e(__("Chamado #:numero", ['numero' => $chamado->numeroChamado])); ?></span>
                              <i class="fa-solid fa-arrow-right ms-2"></i>
                           </a>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      <?php endif; ?>

      <?php echo $__env->yieldContent('content'); ?>
   </div>

</div>
<?php /**PATH /var/www/html/portal/resources/views/layouts/admin/elements/menu.blade.php ENDPATH**/ ?>