<div class="app-menu navbar-menu">
    <!-- LOGO -->
    <div class="navbar-brand-box">
        <!-- Light Logo-->
        <a href="<?php echo e(route('dashboard')); ?>" class="logo logo-light">
            <span class="logo-sm">
                <img src="<?php echo e(get_image_url(get_site_logo())); ?>" alt="" class="sidebar-logo">
            </span>
            <span class="logo-lg">
                <img src="<?php echo e(get_image_url(get_site_logo())); ?>" alt="" class="sidebar-logo">
            </span>
        </a>
        <button type="button" class="btn btn-sm p-0 fs-20 header-item float-end btn-vertical-sm-hover" id="vertical-hover">
            <i class="ri-record-circle-line"></i>
        </button>
    </div>

    <div id="scrollbar">
        <div class="container-fluid">

            <div id="two-column-menu">
            </div>
            <ul class="navbar-nav" id="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link menu-link <?php if($controller == 'DashboardController'): ?> active <?php endif; ?>" href="<?php echo e(route('dashboard')); ?>">
                        <i class="ri-dashboard-2-line"></i> <span data-key="t-widgets">Dashboard</span>
                    </a>
                </li>

                <?php if(Auth::user()->can('role') || Auth::user()->can('user') || Auth::user()->can('customer')): ?>
                <li class="menu-title"><span data-key="t-menu">Administration</span></li>
                <?php endif; ?>
                
                <?php if(Auth::user()->can('role') || Auth::user()->can('user')): ?>
                <li class="nav-item">
                    <a class="nav-link menu-link <?php if(in_array($controller, ['RoleController','UserController'])): ?> active <?php endif; ?>" href="#sidebarAdministration" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebarAdministration">
                        <i class=" ri-shield-user-line"></i> <span data-key="t-dashboards">Users & Roles</span>
                    </a>
                    <div class="collapse menu-dropdown <?php if(in_array($controller, ['RoleController','UserController'])): ?> show <?php endif; ?>" id="sidebarAdministration">
                        <ul class="nav nav-sm flex-column">
                            <?php if(Auth::user()->can('user')): ?>
                            <li class="nav-item">
                                <a href="<?php echo e(route('users')); ?>" class="nav-link <?php if($controller == 'UserController'): ?> active <?php endif; ?>" data-key="t-analytics"> Users </a>
                            </li>
                            <?php endif; ?>

                            <?php if(Auth::user()->can('role')): ?>
                            <li class="nav-item">
                                <a href="<?php echo e(route('roles')); ?>" class="nav-link <?php if($controller == 'RoleController'): ?> active <?php endif; ?>" data-key="t-analytics"> Roles </a>
                            </li>
                            <?php endif; ?>
                        </ul>
                    </div>
                </li>
                <?php endif; ?>

                <?php if(Auth::user()->can('customer')): ?>
                <li class="nav-item">
                    <a class="nav-link menu-link <?php if($controller == 'CustomersController'): ?> active <?php endif; ?>" href="<?php echo e(route('customer')); ?>">
                        <i class="ri-dashboard-2-line"></i> <span data-key="t-widgets">Customers</span>
                    </a>
                </li>
                <?php endif; ?>

                <?php if(Auth::user()->can('sale') || Auth::user()->can('purchase')): ?>
                <li class="menu-title"><span data-key="t-menu">Sales & Purchase</span></li>
                <?php endif; ?>

                <?php if(Auth::user()->can('sale')): ?>
                <li class="nav-item">
                    <a class="nav-link menu-link <?php if(in_array($controller, ['SaleController','RetailerController','SalelistController'])): ?> active <?php endif; ?>" href="#sidebarSale" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebarSale">
                        <i class=" ri-shield-user-line"></i> <span data-key="t-dashboards">Sales</span>
                    </a>
                    <div class="collapse menu-dropdown <?php if(in_array($controller, ['SaleController','RetailerController','SalelistController'])): ?> show <?php endif; ?>" id="sidebarSale">
                        <ul class="nav nav-sm flex-column">
                            <li class="nav-item">
                                <a href="<?php echo e(route('sales')); ?>" class="nav-link <?php if($controller == 'SaleController'): ?> active <?php endif; ?>" data-key="t-analytics">  Retail Sales </a>
                            </li>
                            <li class="nav-item">
                                <a href="<?php echo e(route('retailers')); ?>" class="nav-link <?php if($controller == 'RetailerController'): ?> active <?php endif; ?>" data-key="t-analytics"> Wholsale sales </a>
                            </li>
                            <li class="nav-item">
                                <a href="<?php echo e(route('saleslist')); ?>" class="nav-link <?php if($controller == 'SalelistController'): ?> active <?php endif; ?>" data-key="t-analytics">Sale List </a>
                            </li>
                        </ul>
                    </div>
                </li>
                <?php endif; ?>
                 
                <?php if(Auth::user()->can('purchase')): ?>
                <li class="nav-item">
                    <a class="nav-link menu-link <?php if(in_array($controller, ['PurchaseController','ScrappurchaselistController','PurchaselistController'])): ?> active <?php endif; ?>" href="#sidebarPurchase" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebarPurchase">
                        <i class=" ri-shield-user-line"></i> <span data-key="t-dashboards">Purchase</span>
                    </a>
                    <div class="collapse menu-dropdown <?php if(in_array($controller, ['PurchaseController','ScrappurchaselistController','PurchaselistController'])): ?> show <?php endif; ?>" id="sidebarPurchase">
                        <ul class="nav nav-sm flex-column">
                            <li class="nav-item">
                                <a href="<?php echo e(route('purchases')); ?>" class="nav-link <?php if($controller == 'PurchaseController'): ?> active <?php endif; ?>" data-key="t-analytics"> Add Purchase </a>
                            </li>
                            <li class="nav-item">
                                <a href="<?php echo e(route('scrappurchaseslist')); ?>" class="nav-link <?php if($controller == 'ScrappurchaselistController'): ?> active <?php endif; ?>" data-key="t-analytics">Scrap Purchase list  </a>
                            </li>
                            <li class="nav-item">
                                <a href="<?php echo e(route('purchaseslist')); ?>" class="nav-link <?php if($controller == 'PurchaselistController'): ?> active <?php endif; ?>" data-key="t-analytics">Purchase list </a>
                            </li>  
                        </ul>
                    </div>
                </li>
                <?php endif; ?>

                
                <?php if(Auth::user()->can('stock-list') || Auth::user()->can('stock-history')): ?>
                <li class="menu-title"><span data-key="t-menu">Masterdata</span></li>
                <?php endif; ?>

                <?php if(Auth::user()->can('stock-list') || Auth::user()->can('stock-history')): ?>
                <li class="nav-item">
                    <a class="nav-link menu-link <?php if(in_array($controller, ['StockController','StockhistoryController'])): ?> active <?php endif; ?>" href="#sidebarStock" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebarStock">
                        <i class=" ri-shield-user-line"></i> <span data-key="t-dashboards">Stocks</span>
                    </a>
                    <div class="collapse menu-dropdown <?php if(in_array($controller, ['StockController','StockhistoryController'])): ?> show <?php endif; ?>" id="sidebarStock">
                        <ul class="nav nav-sm flex-column">
                             
                            <?php if(Auth::user()->can('stock-list')): ?>
                            <li class="nav-item">
                                <a href="<?php echo e(route('stocks')); ?>" class="nav-link <?php if($controller == 'StockController'): ?> active <?php endif; ?>" data-key="t-analytics"> Stock List </a>
                             </li>
                             <?php endif; ?>    
                            
                             <?php if(Auth::user()->can('stock-history')): ?>
                             <li class="nav-item">
                                <a href="<?php echo e(route('stockshistory')); ?>" class="nav-link <?php if($controller == 'StockhistoryController'): ?> active <?php endif; ?>" data-key="t-analytics"> Stock History </a>
                             </li>
                             <?php endif; ?>
                        </ul>
                    </div>
                </li>
                <?php endif; ?>
                
            </ul>
        </div>
        <!-- Sidebar -->
    </div>

    <div class="sidebar-background"></div>
</div><?php /**PATH /home/cdiagk1jmlvy/public_html/goldiam/resources/views/Layouts/sidebar.blade.php ENDPATH**/ ?>