<?php 

    // Menu active class add
    if (! function_exists('activeMenu')) {
        function activeMenu($sig, $data){
            return (Request::segment($sig) == $data)?'active':'';
        }
    }
    // Menu menu open class add
    if (! function_exists('menuOpenActive')) {
        function menuOpenActive($sig, $data, $active=false){
            if (is_array($data)) {
                for ($x = 0; $x < count($data); $x++) {
                    if (Request::segment($sig) == $data[$x]) {
                        if ($active) {
                            return 'active';
                        }else{
                            return 'menu-open';
                        }

                    }
                }
            }else{
                return (Request::segment($sig) == $data)?'menu-open':'';
            }
        }
    }

?>


        <div id="sidebar-wrapper" class="bg-dark border-right  d-lg-block ">
            <div class="sidebar-heading text-white p-3">
                <a href="./index.html" class="brand-link top_title">
                    <span class="w-100"><img style="margin: 0 auto; max-height:40px " class="d-block"
                            src="./assets/img/wasa_logo.png"></span>
                    <p class="brand-text font-weight-light text-center">TechUNO</p>
                </a>
            </div>

            <ul id="sidebarAccordion">
                <li>
                    <a href="<?php echo e(url('/')); ?>" class="nav-link <?php echo e(activeMenu(1, '')); ?>">
                        <i class="fas fa-tachometer-alt"></i>
                        <span>Dashboard</span>
                    </a>
                </li>

                <!-- Dropdown Menu for Content Management -->
                

                <li class="nav-item <?php echo e(menuOpenActive(1, ['user-manager','permissions','branch-manager','role'])); ?>">
                    <a href="#" class="nav-link dropdown-toggle <?php echo e(menuOpenActive(1, ['user-manager','permissions','branch-manager','role'], true)); ?>">
                        <i class="nav-icon fas fa-assistive-listening-systems"></i>
                        <span>System</span>
                        <i class="fas fa-chevron-down float-end"></i>
                    </a>
                    <ul class="collapse list-unstyled">
                        <li><a href="<?php echo e(url('user-manager')); ?>" class="nav-link ps-3 <?php echo e(activeMenu(1, 'user-manager')); ?>"><i class="fas fa-circle"></i> User Manager</a></li>
                        <li><a href="<?php echo e(url('permissions')); ?>" class="nav-link ps-3 <?php echo e(activeMenu(1, 'permissions')); ?>"><i class="fas fa-circle"></i> Permissions</a></li>
                        <li><a href="<?php echo e(url('branch-manager')); ?>" class="nav-link ps-3 <?php echo e(activeMenu(1, 'branch-manager')); ?>"><i class="fas fa-circle"></i> Branch Manager</a></li>
                        <li><a href="<?php echo e(url('role')); ?>" class="nav-link ps-3 <?php echo e(activeMenu(1, 'role')); ?>"><i class="fas fa-circle"></i> Role</a></li>
                    </ul>
                </li>



                <li class="nav-item <?php echo e(menuOpenActive(1, ['modules'])); ?>">
                    <a href="#" class="nav-link dropdown-toggle <?php echo e(menuOpenActive(1, ['modules'], true)); ?>">
                        <i class="nav-icon fas fa-cogs"></i>
                        <span>Configuration</span>
                        <i class="fas fa-chevron-down float-end"></i>
                    </a>
                    <ul class="collapse list-unstyled">
                        <li><a href="<?php echo e(url('modules')); ?>" class="nav-link ps-3 <?php echo e(activeMenu(1, 'modules')); ?>"><i class="fas fa-circle"></i> Software Module</a></li>
                    </ul>
                </li>

                <li>
                    <a href="<?php echo e(url('settings')); ?>" class="nav-link <?php echo e(activeMenu(1, 'settings')); ?>">
                        <i class="fas fa-cog"></i>
                        <span>Settings</span>
                    </a>
                </li>
                <li>
                    <a href="<?php echo e(url('login')); ?>" class="nav-link <?php echo e(activeMenu(1, 'login')); ?>">
                        <i class="nav-icon fas fa-sign-out-alt"></i>
                        <span>Logout</span>
                    </a>
                </li>
                
            </ul>



        </div><?php /**PATH C:\techuno\testing-laravel\resources\views/includes/sidebar.blade.php ENDPATH**/ ?>