<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">
    <br>
    <div class="sidebar-header">
        <h3>
            <center>
                <img src="<?php echo e(URL::asset('img\logo-pmax-full.png')); ?>" class="brand-image rounded elevation-3" height="100" style="margin:-10px; opacity: .8"/>
            </center>
        </h3>
        <strong>
            <img src="<?php echo e(URL::asset('img\logo-pmax-branco.png')); ?>" class="rounded" height="18" style="margin:-10px;"/>
        </strong>
    </div>
    <br>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user panel (optional) -->
      <!-- <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">
          <img src="<?php echo e(URL::asset('AdminLTE-3.0.5/dist/img/user2-160x160.jpg')); ?>" class="img-circle elevation-2" alt="User Image">
        </div>
        <div class="info">
          <a href="#" class="d-block">Alexander Pierce</a>
        </div>
      </div> -->

      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
          <!-- Add icons to the links using the .nav-icon class
               with font-awesome or any other icon font library -->

               <li class="nav-item has-treeview menu-open">
                  <a href="<?php echo e(route('home')); ?>" class="nav-link" style="color: #D9D9D9">
                      <i class="fas fa-home fa-lg" style="color: #77b300"></i>&nbsp;&nbsp;<p>Início </p>
                  </a>
              </li>
               <?php $__currentLoopData = Auth::user()->Classe->first()->RotasMenu; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rota): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                <?php if($rota->Rotas->count() > 0): ?>

                    <li class="nav-item has-treeview menu-open">
                        <a href="#Submenu_<?php echo e($rota->getId()); ?>" data-toggle="collapse" aria-expanded="false" class="nav-link" style="color: #D9D9D9">
                            <i class="<?php echo e($rota->getIcone()); ?> fa-lg" style="color: #77b300"></i>&nbsp;&nbsp;<p> <?php echo e($rota->getNome()); ?> <i class="right fas fa-angle-left"></i></p>
                        </a>
                        <ul class="collapse list-unstyled" id="Submenu_<?php echo e($rota->getId()); ?>">

                            <?php $__currentLoopData = $rota->Rotas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subRota): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                <?php if($subRota->isMenu()): ?>
                                    <li  class="nav-item">
                                        <a class="nav-link" href="<?php echo e(route($subRota->getRota())); ?>">&nbsp;&nbsp;<i class="<?php echo e($subRota->getIcone()); ?> fa-lg" style="color: #f7ffe6"></i>&nbsp;&nbsp;<?php echo e($subRota->getNome()); ?></a>
                                    </li>
                                <?php endif; ?>

                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                        </ul>
                    </li>

                <?php elseif(empty($rota->RotaPai)): ?>

                    <li class="nav-item">
                        <a href="<?php echo e(route($rota->getRota())); ?>">
                            <i class="<?php echo e($rota->getIcone()); ?>"></i>
                            <?php echo e($rota->getNome()); ?>

                        </a>
                    </li>

                <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>
