<?php if($typeSub['status'] == true): ?>
<?php $__currentLoopData = $typeSub['data']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($ts['id'] == $idMenu): ?>
<div class="accordion" id="accordionleftmenu<?php echo e($ts['id']); ?>">
    <div class="accordion-item">
        <h2 class="accordion-header" id="heading<?php echo e($ts['id']); ?>" data-index="<?php echo e($ts['id']); ?>">
            <a href="<?php echo e(route($codePage,$ts['id'])); ?>" style="text-decoration: none;" class="
                  accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseZero<?php echo e($ts['id']); ?>"
                aria-expanded="true" aria-controls="collapseZero<?php echo e($ts['id']); ?>">
                <h5><?php echo e($ts["name"]); ?></h5>
            </a>
        </h2>
        <div id="collapseZero<?php echo e($ts['id']); ?>" class="accordion-collapse collapse show" data-index="<?php echo e($ts['id']); ?>"
            aria-labelledby="heading<?php echo e($ts['id']); ?>" data-bs-parent="#accordionleftmenu<?php echo e($ts['id']); ?>">
            <div class="accordion-body">
                <div class="list-group">
                    <?php if($typeTri['status'] == true): ?>
                    <?php $__currentLoopData = $typeTri['data']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($tt['sub_level'] == $ts['id']): ?>
                    <?php if($tt['id'] == $idSub and $idSub != 0): ?>
                    <a href="<?php echo e(route($codePage,$tt['id'])); ?>" data-index="<?php echo e($tt['id']); ?>"
                        class="list-group-item list-group-item-action active" aria-current="true">
                        <?php echo e($tt['name']); ?>

                    </a>
                    <?php else: ?>
                    <a href="<?php echo e(route($codePage,$tt['id'])); ?>" data-index="<?php echo e($tt['id']); ?>"
                        class="list-group-item list-group-item-action" aria-current="true">
                        <?php echo e($tt['name']); ?>

                    </a>
                    <?php endif; ?>
                    <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</div>
<?php else: ?>
<div class="accordion" id="accordionleftmenu<?php echo e($ts['id']); ?>">
    <div class="accordion-item">
        <h2 class="accordion-header" id="heading<?php echo e($ts['id']); ?>" data-index="<?php echo e($ts['id']); ?>">
            <a href="<?php echo e(route($codePage,$ts['id'])); ?>" style="text-decoration: none;"
                class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                data-bs-target="#collapseZero<?php echo e($ts['id']); ?>" aria-expanded="false"
                aria-controls="collapseZero<?php echo e($ts['id']); ?>">
                <h5><?php echo e($ts["name"]); ?></h5>
            </a>
        </h2>
        <div id="collapseZero<?php echo e($ts['id']); ?>" class="accordion-collapse collapse" data-index="<?php echo e($ts['id']); ?>"
            aria-labelledby="heading<?php echo e($ts['id']); ?>" data-bs-parent="#accordionleftmenu<?php echo e($ts['id']); ?>">
            <div class="accordion-body">
                <div class="list-group">
                    <?php if($typeTri['status'] == true): ?>
                    <?php $__currentLoopData = $typeTri['data']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($tt['sub_level'] == $ts['id']): ?>
                    <?php if($tt['id'] == $idSub and $idSub != 0): ?>
                    <a href="<?php echo e(route($codePage,$tt['id'])); ?>" data-index="<?php echo e($tt['id']); ?>"
                        class="list-group-item list-group-item-action active" aria-current="true">
                        <?php echo e($tt['name']); ?>

                    </a>
                    <?php else: ?>
                    <a href="<?php echo e(route($codePage,$tt['id'])); ?>" data-index="<?php echo e($tt['id']); ?>"
                        class="list-group-item list-group-item-action" aria-current="true">
                        <?php echo e($tt['name']); ?>

                    </a>
                    <?php endif; ?>
                    <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</div>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<script>
$('.accordion-item').on('show.bs.collapse', function(e) {
    $(".loader").show();
    // window.location.href = $(e.target).siblings('.accordion-header').find('a').attr('href');
    var page = $(e.target).siblings('.accordion-header').find('a').attr('href');
    // console.log(page == undefined);
    if (page != undefined) {
        window.location.replace(page);
    } else {
        $(".loader").hide();
    }
});
$('.list-group-item').click(function(e) {
    $(".loader").show();
});
</script>
<?php endif; ?><?php /**PATH /var/www/html/km-web/resources/views/layouts/partials/front/leftmenuSub.blade.php ENDPATH**/ ?>