<aside id="sidebar" class="admin-sidebar">
    <div class="admin-sidebar-brand">
        <a href="<?php echo e(route('admin.dashboard')); ?>" class="admin-brand-link">
            <?php if($siteLogo): ?>
                <img src="<?php echo e(public_asset_url($siteLogo)); ?>" alt="" class="admin-brand-logo">
            <?php else: ?>
                <span class="admin-brand-mark"><?php echo e(strtoupper(substr($siteName, 0, 2))); ?></span>
            <?php endif; ?>
            <span class="admin-brand-copy">
                <span class="admin-brand-name"><?php echo e($siteName); ?></span>
                <span class="admin-brand-meta">Admin Control</span>
            </span>
        </a>
        <button type="button" class="admin-icon-button md:hidden" onclick="AdminUI.toggleSidebar()"
            aria-label="Close menu"><i class="bi bi-x-lg"></i></button>
    </div>

    <nav id="admin-sidebar-nav" class="admin-sidebar-nav" aria-label="Admin navigation">
        <?php $__currentLoopData = $navGroups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php
                $visibleItems = collect($group['items'])->filter(fn($item) => empty($item['permission']) || Auth::user()->canAccessModule($item['permission']));
                $groupIsActive = $visibleItems->contains(fn($item) => request()->routeIs($item['match']));
            ?>
            <?php if($visibleItems->isEmpty()) continue; ?>
            <?php if(!empty($group['single_link']) && $visibleItems->count() === 1): ?>
                <?php ($singleItem = $visibleItems->first()); ?>
                <section class="admin-nav-group">
                    <a href="<?php echo e(route($singleItem['route'])); ?>"
                        class="admin-nav-link <?php echo e(request()->routeIs($singleItem['match']) ? 'is-active nav-link-active' : ''); ?>">
                        <i class="bi <?php echo e($singleItem['icon']); ?>"></i>
                        <span><?php echo e($group['label']); ?></span>
                    </a>
                </section>
            <?php else: ?>
                <section class="admin-nav-group <?php echo e($groupIsActive ? 'is-open' : ''); ?>">
                    <button type="button" class="admin-nav-group-toggle" data-admin-nav-group
                        aria-expanded="<?php echo e($groupIsActive ? 'true' : 'false'); ?>">
                        <span><?php echo e($group['label']); ?></span>
                        <i class="bi bi-chevron-down"></i>
                    </button>
                    <div class="admin-nav-group-items">
                        <?php $__currentLoopData = $visibleItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <a href="<?php echo e(route($item['route'])); ?>"
                                class="admin-nav-link <?php echo e(request()->routeIs($item['match']) ? 'is-active nav-link-active' : ''); ?>">
                                <i class="bi <?php echo e($item['icon']); ?>"></i>
                                <span><?php echo e($item['label']); ?></span>
                            </a>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </section>
            <?php endif; ?>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </nav>

</aside>
<?php /**PATH /Users/mac/Documents/e-com/resources/views/layouts/partials/sidebar.blade.php ENDPATH**/ ?>