<div class="az-header" style="border-bottom:1px solid #00beda;">
    <div class="container-fluid">
        <div class="az-header-left">
            <a href="<?php echo e(url('admin')); ?>" class="az-logo"><span></span> <img src="<?php echo e(asset('img/logo.png')); ?>"
                    style="height:80px;padding-top:15px;"></a>
            <a href="" id="azMenuShow" class="az-header-menu-icon d-lg-none"><span></span></a>
        </div><!-- az-header-left -->
        <div class="az-header-menu">
            <div class="az-header-menu-header">
                <a href="<?php echo e(url('admin')); ?>" class="az-logo"><span></span> <img src="<?php echo e(asset('img/logo.png')); ?>"
                        style="height:60px;"></a>
                <a href="" class="close">&times;</a>
            </div><!-- az-header-menu-header -->
            <ul class="nav">
                <?php if(auth()->user()->hasRole('super-admin')): ?>
                    <?php if(auth()->user()->can('Dashboard')): ?>
                        <li class="nav-item">
                            <a href="<?php echo e(url('admin')); ?>" style="text-decoration: none;" class="nav-lin ">
                                <i class="typcn typcn-chart-area-outline"></i> Dashboard
                            </a>
                        </li>
                    <?php endif; ?>
                <?php endif; ?>

                <?php if(auth()->user()->can('Operations')): ?>
                    <li class="nav-item">
                        <a href="" class="nav-link with-sub"><i class="typcn typcn-arrow-sync"></i>
                            Operations</a>
                        <div class="az-menu-sub">
                            <nav class="nav">
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Customers')): ?>
                                    <a href="<?php echo e(url('customers')); ?>" class="nav-link">Customers</a>
                                <?php endif; ?>
                                
                            </nav>
                        </div>
                    </li>
                <?php endif; ?>

                <li class="nav-item">
                    <a href="" class="nav-link with-sub"><i class="typcn typcn-shopping-cart"></i>

                        Procurement</a>
                    <div class="az-menu-sub">
                        <nav class="nav">
                            <a href="<?php echo e(url('po/list')); ?>" class="nav-link">Purchase Order</a>
                        </nav>
                    </div>
                </li>
                <?php if(auth()->user()->can('Inventory')): ?>
                    <li class="nav-item">
                        <a href="" class="nav-link with-sub"><i class="typcn typcn-power"></i> Inventory</a>
                        <nav class="az-menu-sub">
                            <?php if (\Gate::any(['Brands', 'Products'])): ?>
                                <a href="<?php echo e(route('brands.list')); ?>" class="nav-link">Brands & Products</a>
                            <?php endif; ?>
                            <?php if (\Gate::any(['Products'])): ?>
                                <a href="<?php echo e(route('products.all')); ?>" class="nav-link">All Products</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Supplier')): ?>
                                <a href="<?php echo e(route('supplier.list')); ?>" class="nav-link">Suppliers</a>
                            <?php endif; ?>
                            
                        </nav>
                    </li>
                <?php endif; ?>

                <?php if(auth()->user()->can('Accounts')): ?>
                    <li class="nav-item">
                        <a href="" class="nav-link with-sub"><i class="typcn typcn-tabs-outline"></i>Accounts</a>
                        <nav class="az-menu-sub">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Chart of Account')): ?>
                                <a href="<?php echo e(url('main_account')); ?>" class="nav-link">Chart of Accounts</a>
                            <?php endif; ?>
                            
                            

                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Journal Vouchers')): ?>
                                <a href="<?php echo e(url('voucher/list')); ?>" class="nav-link">Vouchers</a>
                            <?php endif; ?>
                            
                            
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('General Ledger')): ?>
                                <a href="<?php echo e(route('ledger.list')); ?>" class="nav-link">General Ledger</a>
                            <?php endif; ?>
                            
                        </nav>
                    </li>
                <?php endif; ?>

                <?php if(auth()->user()->can('Reports')): ?>
                    <li class="nav-item">
                        <a href="" class="nav-link with-sub"><i
                                class="typcn typcn-chart-pie-outline"></i>Reports</a>
                        <nav class="az-menu-sub">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Sale Report')): ?>
                                <a href="<?php echo e(url('users')); ?>" class="nav-link">Sale Report</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Stock Report')): ?>
                                <a href="<?php echo e(url('users')); ?>" class="nav-link">Stock Report</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Purchase Report')): ?>
                                <a href="<?php echo e(url('users')); ?>" class="nav-link">Purchase Report</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Ageing Report')): ?>
                                <a href="<?php echo e(url('users')); ?>" class="nav-link">Ageing Report</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Customer Wise Report')): ?>
                                <a href="<?php echo e(url('users')); ?>" class="nav-link">Customer Wise Report</a>
                            <?php endif; ?>
                        </nav>
                    </li>
                <?php endif; ?>

                <?php if(auth()->user()->can('Administration')): ?>
                    <li class="nav-item">
                        <a href="" class="nav-link with-sub"><i class="typcn typcn-user"></i>Administrator</a>
                        <nav class="az-menu-sub">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Users')): ?>
                                <a href="<?php echo e(url('users')); ?>" class="nav-link">Users Management</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Roles')): ?>
                                <a href="<?php echo e(url('roles')); ?>" class="nav-link">Roles Management</a>
                            <?php endif; ?>
                            
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Departments')): ?>
                                <a href="<?php echo e(url('departments')); ?>" class="nav-link">Deparments</a>
                            <?php endif; ?>
                        </nav>
                    </li>
                <?php endif; ?>

                <?php if(auth()->user()->can('Preferences')): ?>
                    <li class="nav-item">
                        <a href="" class="nav-link with-sub"><i
                                class="typcn typcn-tabs-outline"></i>Preferences</a>
                        <nav class="az-menu-sub">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Measurement Units')): ?>
                                <a href="<?php echo e(url('measurement_unit')); ?>" class="nav-link">Measurement Units</a>
                            <?php endif; ?>
                            
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Discounts')): ?>
                                <a href="<?php echo e(url('discounts')); ?>" class="nav-link">Discounts</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Product Categories')): ?>
                                <a href="<?php echo e(url('product')); ?>" class="nav-link">Product Categories</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Notifications Management')): ?>
                                <a href="<?php echo e(route('notification.list')); ?>" class="nav-link">Notifications
                                    Management</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Employees')): ?>
                                <a href="<?php echo e(url('employee')); ?>" class="nav-link">Employees</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Invoice Preferences')): ?>
                                <a href="<?php echo e(url('invoice/list')); ?>" class="nav-link">Invoice Preferences</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Service Purchase')): ?>
                                <a href="<?php echo e(route('service_purchase.list')); ?>" class="nav-link">Service Purchase</a>
                            <?php endif; ?>
                            
                        </nav>
                    </li>
                <?php endif; ?>
            </ul>
        </div><!-- az-header-menu -->
        <div class="az-header-right">
            <!--            <?php if(checkPermission('inquiry/create') == 1): ?>
<a href="<?php echo e(url('inquiry/create')); ?>"
                    style="font-size: 14px;color:green;text-decoration:none;font-weight:bold;" title="Create Inquiry"
                    class="az-header-search-link"><i style="color:green;font-size:18px;" class="fas fa-plus-square"></i></a>
<?php endif; ?>-->
            <div class="dropdown az-header-notification">
                <a href="" class="" title="My General Notification" id="noti_general"><i
                        class="typcn typcn-bell"></i></a>
                <div class="dropdown-menu">
                    <div class="az-dropdown-header mg-b-20 d-sm-none">
                        <a href="" class="az-header-arrow"><i class="icon ion-md-arrow-back"></i></a>
                    </div>
                    <h6 class="az-notification-title">General Notifications</h6>
                    <p class="az-notification-text">You have <span id="noti_count_general">0</span> unread
                        notification</p>
                    <div class="az-notification-list" id="add_noti_general">
                    </div><!-- az-notification-list -->
                    <div class="dropdown-footer"><a href="">View All Notifications</a></div>
                </div><!-- dropdown-menu -->
            </div><!-- az-header-notification -->

            <div class="dropdown az-header-notification">
                <a href="" class="" title="My Payments Notification" id="noti_payments">
                    <i class="typcn typcn-mail"></i></a>
                <div class="dropdown-menu">
                    <div class="az-dropdown-header mg-b-20 d-sm-none">
                        <a href="" class="az-header-arrow"><i class="icon ion-md-arrow-back"></i></a>
                    </div>
                    <h6 class="az-notification-title">Payments</h6>
                    <p class="az-notification-text">You have <span id="noti_count_payments">0</span> unread
                        notification</p>
                    <div class="az-notification-list" id="add_noti_payments">


                    </div><!-- az-notification-list -->
                    <div class="dropdown-footer"><a href="">View All Notifications</a></div>
                </div><!-- dropdown-menu -->
            </div><!-- az-header-notification -->

            <!-- az-header-notification -->
            <div class="dropdown az-profile-menu">
                <a href="" class="az-img-user"><img src="<?php echo e(url('/img/default_user_2.png')); ?>"
                        alt="" style="height:30px;width:30px;border-radius: 50%;"></a>
                <div class="dropdown-menu">
                    <div class="az-dropdown-header d-sm-none">
                        <a href="" class="az-header-arrow"><i class="icon ion-md-arrow-back"></i></a>
                    </div>
                    <div class="az-header-profile">
                        <div class="az-img-user">
                            <img src="<?php echo e(url('/img/default_user_2.png')); ?>" alt=""
                                style="height:100px;width:100px;border-radius: 50%;">
                        </div><!-- az-img-user -->
                        <br>
                        <h6><span style="font-weight:bold">User: <?= auth()->user()->name ?> <a
                                    href="<?php echo e(url('/clear-cache')); ?>" title="Clear System Cache" class=""
                                    id="noti_my_jobs"><i class="typcn typcn-refresh"
                                        style="font-size:18px;color:#00beda"></i></a></span>


                        </h6>
                        <span></span>
                    </div><!-- az-header-profile -->

                    <a href="<?php echo e(url('my_profile')); ?>" class="dropdown-item"><i class="typcn typcn-user-outline"></i>
                        My Profile</a>
                    <!--                    <a href="#" class="dropdown-item"><i class="typcn typcn-edit"></i> Edit Profile</a>
                    <a href="#" class="dropdown-item"><i class="typcn typcn-time"></i> My Activity</a>
                    <a href="#" class="dropdown-item"><i class="typcn typcn-cog-outline"></i> Account
                        Settings</a>-->
                    <a href="<?php echo e(url('logout')); ?>" class="dropdown-item"><i class="typcn typcn-power-outline"></i>
                        Sign Out</a>
                </div><!-- dropdown-menu -->
            </div>
            <span style="font-weight:bold"><?= auth()->user()->name ?></span>
        </div><!-- az-header-right -->
    </div><!-- container -->
</div><!-- az-header -->
<?php /**PATH C:\wamp64\www\mds-scm\resources\views/layouts/header.blade.php ENDPATH**/ ?>