<div class="az-header no-print" style="border-bottom:1px solid #00beda;">
    <div class="container-fluid">
        <div class="az-header-left">
            <a href="{{ url('admin') }}" class="az-logo"><span></span> <img src="{{ 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="{{ url('admin') }}" class="az-logo"><span></span> <img src="{{ asset('img/logo.png') }}"
                        style="height:60px;"></a>
                <a href="" class="close">&times;</a>
            </div><!-- az-header-menu-header -->
            <ul class="nav">
                @if (auth()->user()->hasRole('Super-Admin'))
                    @if (auth()->user()->can('Dashboard'))
                        <li class="nav-item">
                            <a href="{{ url('admin') }}" style="text-decoration: none;" class="nav-lin ">
                                <i class="typcn typcn-chart-area-outline"></i> Dashboard
                            </a>
                        </li>
                    @endif
                @endif

                @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">
                                @can('Customers')
                                    <a href="{{ url('customers') }}" class="nav-link">Customers</a>
                                @endcan

                                @can('Supplier')
                                    <a href="{{ route('supplier.list') }}" class="nav-link">Suppliers</a>
                                @endcan

                                @can('Sale list')
                                    <a href="{{ route('sales.list') }}" class="nav-link">Sales</a>
                                @endcan

                                @can('Sale Rate Application')
                                    <a href="{{ route('sale_rate.create') }}" class="nav-link">Sale Rate Application</a>
                                @endcan
                                {{-- @can('Purchase')
                                    <a href="#" class="nav-link">Purchase</a>
                                @endcan

                                 @can('Service Purchase')
                                    <a href="#" class="nav-link">Service Purchase</a>
                                @endcan --}}
                            </nav>
                        </div>
                    </li>
                @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">
                            @can('Goods Receipts list')
                                <a href="{{ route('good_receipts.list') }}" class="nav-link">Good Receipts</a>
                            @endcan

                            @can('Purchase list')
                                <a href="{{ url('po/list') }}" class="nav-link">Purchase Order</a>
                            @endcan
                            @can('Goods Receipts Billing / B-Cheque list')
                                <a href="{{ route('b_cheque.list') }}" class="nav-link">B-Cheque</a>
                            @endcan
                        </nav>
                    </div>
                </li>
                @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">
                            @canAny(['Brands', 'Products'])
                                <a href="{{ route('brands.list') }}" class="nav-link">Brands & Products</a>
                            @endcanAny
                            @canAny(['Products'])
                                <a href="{{ route('products.all') }}" class="nav-link">Goods Inventory</a>
                            @endcanAny

                        </nav>
                    </li>
                @endif

                @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">
                            @can('Chart of Account')
                                <a href="{{ url('main_account') }}" class="nav-link">Chart of Accounts</a>
                            @endcan

                            @can('Journal Vouchers')
                                <a href="{{ url('voucher/list') }}" class="nav-link"> Journal Vouchers</a>
                            @endcan

                            {{-- <a href="{{ url('voucher/list') }}" class="nav-link"> Journal Vouchers</a> --}}


                            <a href="{{ route('payment.list') }}" class="nav-link">Payment Vouchers</a>

                            <a href="{{ route('receipt_voucher.list') }}" class="nav-link"> Receipts Vouchers</a>

                            <a href="{{ route('service_voucher.list') }}" class="nav-link"> Service Purchase
                                Vouchers</a>

                            {{-- @can('General Ledger')
                                <a href="{{ route('ledger.list') }}" class="nav-link">General Ledger</a>
                            @endcan --}}

                        </nav>
                    </li>
                @endif

                @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">
                            @can('Sale Report')
                                <a href="{{ url('users') }}" class="nav-link">Sale Report</a>
                            @endcan
                            @can('Stock Report')
                                <a href="{{ url('users') }}" class="nav-link">Stock Report</a>
                            @endcan
                            @can('Purchase Report')
                                <a href="{{ url('users') }}" class="nav-link">Purchase Report</a>
                            @endcan
                            @can('Ageing Report')
                                <a href="{{ url('users') }}" class="nav-link">Ageing Report</a>
                            @endcan
                            @can('Customer Wise Report')
                                <a href="{{ url('users') }}" class="nav-link">Customer Wise Report</a>
                            @endcan
                        </nav>
                    </li>
                @endif

                @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">
                            @can('Users')
                                <a href="{{ url('users') }}" class="nav-link">Users Management</a>
                            @endcan
                            @can('Roles')
                                <a href="{{ url('roles') }}" class="nav-link">Roles Management</a>
                            @endcan
                            {{-- @can('Permissions')
                                <a href="{{ url('permissions') }}" class="nav-link">Permissions Management</a>
                            @endcan
                            @can('Escalation Management')
                                <a href="#" class="nav-link">Escalation Management</a>
                            @endcan --}}
                            {{-- @can('Departments')
                                <a href="{{ url('departments') }}" class="nav-link">Deparments</a>
                            @endcan --}}
                        </nav>
                    </li>
                @endif

                @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">
                            @can('Measurement Units')
                                <a href="{{ url('measurement_unit') }}" class="nav-link">Measurement Units</a>
                            @endcan
                            @can('Unit Types')
                                <a href="{{ url('unit_type') }}" class="nav-link">Unit Types</a>
                            @endcan
                            @can('Discounts')
                                <a href="{{ url('discounts') }}" class="nav-link">Discounts</a>
                            @endcan
                            @can('Product Categories')
                                <a href="{{ url('product') }}" class="nav-link">Product Categories</a>
                            @endcan
                            @can('Notifications Management')
                                <a href="#" class="nav-link">Notifications
                                    Management</a>
                            @endcan
                            @can('Employees')
                                <a href="{{ url('employee') }}" class="nav-link">Employees</a>
                            @endcan
                            <a href="#" class="nav-link">Store Management</a>
                            {{-- @can('WhatsApp / SMS Casting Preferences')
                                <a href="{{ url('/cities') }}" class="nav-link">WhatsApp / SMS Casting Preferences</a>
                            @endcan --}}
                        </nav>
                    </li>
                @endif
            </ul>
        </div><!-- az-header-menu -->
        <div class="az-header-right">
            <a href="{{ url('/clear-cache') }}" title="Clear System Cache" class="" id="noti_my_jobs"><i
                    class="typcn typcn-refresh" style="font-size:24px;color:#00beda"></i></a>
            <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="{{ 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="{{ 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 ?> </span>


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

                    <a href="{{ 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="{{ 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 -->
