<nav id="sidebar">
    <div class="sidebar-header">
        <h3>
            <center>
                <img src="<?php echo e(URL::asset('img\logo_reduzido2.png')); ?>" class="rounded" height="45" style="margin:-10px;"/>
            </center>
        </h3>
        <strong>
            <img src="<?php echo e(URL::asset('img\logo_vertical2.png')); ?>" class="rounded" height="80" style="margin:-10px;"/>
        </strong>
    </div>

    <ul class="list-unstyled components">
        <li>
            <a href="<?php echo e(route('home')); ?>">
                <i class="fas fa-home fa-lg"></i>Início
            </a>
        </li>

        <?php $__currentLoopData = Auth::user()->Classe->first()->RotasMenu; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rota): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

            <?php if($rota->isMenu()): ?>

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

                    <li>
                        <a href="#Submenu_<?php echo e($rota->getId()); ?>" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">
                            <i class="<?php echo e($rota->getIcone()); ?>"></i> <?php echo e($rota->getNome()); ?>

                        </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>
                                        <a href="<?php echo e((!empty($subRota->getRota()) ? route($subRota->getRota()) : '#')); ?>"><i class="<?php echo e($subRota->getIcone()); ?>"></i><?php echo e($subRota->getNome()); ?></a>
                                    </li>
                                <?php endif; ?>

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

                        </ul>
                    </li>

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

                    <li>
                        <a href="<?php echo e((!empty($rota->getRota()) ? route($rota->getRota()) : '#')); ?>">
                            <i class="<?php echo e($rota->getIcone()); ?>"></i>
                            <?php echo e($rota->getNome()); ?>

                        </a>
                    </li>

                <?php endif; ?>

            <?php endif; ?>

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


    </ul>
</nav>
