<div class="az-header" 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'))
                    <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

                <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">
                            @if (checkPermission('customers') == 1)
                                <a href="{{ url('customers') }}" class="nav-link">Customers</a>
                            @endif
                            <a href="#" class="nav-link">Purchase</a>
                            <a href="#" class="nav-link">Sale</a>
                            <a href="#" class="nav-link">Service Purchase</a>
                        </nav>
                    </div>
                </li>
                {{-- @if (checkPermission('setup') == 1)
                    <li class="nav-item">
                        <a href="" class="nav-link with-sub"><i class="typcn typcn-power"></i> Inventory</a>
                        <nav class="az-menu-sub">
                            @if (checkPermission('brands/list') == 1)
                                <a href="{{ route('brands.list') }}" class="nav-link">Brands & Products</a>
                            @endif
                            @if (checkPermission('supplier/list') == 1)
                                <a href="{{ route('supplier.list') }}" class="nav-link">Suppliers</a>
                            @endif

                            @if (checkPermission('approval_group') == 1)
                                <a href="{{ url('approval_group') }}" class="nav-link">Approval Group</a>
                            @endif
                            @if (checkPermission('escalation_group') == 1)
                                <a href="{{ url('escalation_group') }}" class="nav-link">Escalation Group</a>
                            @endif

                            <a href="#" class="nav-link">Sale Rate Application</a>
                        </nav>
                    </li>
                @endif --}}

                @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">
                            {{-- @can('brands')
                                <a href="{{ route('brands.list') }}" class="nav-link">Brands & Products</a>
                            @endcan --}}
                            @canAny(['Brands', 'Products'])
                                <a href="{{ route('brands.list') }}" class="nav-link">Brands & Products</a>
                            @endcanAny
                            <a href="{{ route('supplier.list') }}" class="nav-link">Suppliers</a>
                            <a href="#" class="nav-link">Sale Rate Application</a>
                        </nav>
                    </li>
                @endif


                @if (checkPermission('accounts') == 1)
                    <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">
                            <a href="{{ url('main_account') }}" class="nav-link">Chart of Accounts</a>
                            <a href="{{ url('#') }}" class="nav-link">Goods Receipts Billing / B-Cheque</a>
                            <a href="{{ url('#') }}" class="nav-link">Goods Receipts</a>
                            <a href="{{ url('#') }}" class="nav-link">Journal Vouchers</a>
                            <a href="{{ url('#') }}" class="nav-link">Payment Voucher</a>
                            <a href="{{ url('#') }}" class="nav-link">Receivables / Payables</a>
                            <a href="{{ url('#') }}" class="nav-link">General Ledger</a>

                            @if (checkPermission('payment_invoice_list') == 1)
                                <a href="{{ url('payment_invoice_list') }}" class="nav-link">Payments Invoice</a>
                            @endif

                        </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', $user)
                                <a href="{{ url('main_account') }}" class="nav-link">Chart of Accounts</a>
                            @endcan
                            <a href="{{ url('#') }}" class="nav-link">Goods Receipts Billing / B-Cheque</a>
                            <a href="{{ url('#') }}" class="nav-link">Goods Receipts</a>
                            <a href="{{ url('#') }}" class="nav-link">Journal Vouchers</a>
                            <a href="{{ url('#') }}" class="nav-link">Payment Voucher</a>
                            <a href="{{ url('#') }}" class="nav-link">Receivables / Payables</a>
                            <a href="{{ url('#') }}" class="nav-link">General Ledger</a>

                            @if (checkPermission('payment_invoice_list') == 1)
                                <a href="{{ url('payment_invoice_list') }}" class="nav-link">Payments Invoice</a>
                            @endif

                        </nav>
                    </li>
                @endif --}}

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

                @if (checkPermission('administrator') == 1)
                    <li class="nav-item">
                        <a href="" class="nav-link with-sub"><i class="typcn typcn-user"></i>Administrator</a>
                        <nav class="az-menu-sub">
                            @if (checkPermission('users') == 1)
                                <a href="{{ url('users') }}" class="nav-link">User Management</a>
                            @endif
                            @if (checkPermission('roles') == 1)
                                <a href="{{ url('roles') }}" class="nav-link">Roles Management</a>
                            @endif

                            <a href="#" class="nav-link">Escalation Management</a>

                            @if (checkPermission('departments') == 1)
                                <a href="{{ url('departments') }}" class="nav-link">Permission Management</a>
                            @endif
                            @if (checkPermission('departments') == 1)
                                <a href="{{ url('departments') }}" class="nav-link">Deparments</a>
                            @endif

                        </nav>
                    </li>
                @endif

                @if (checkPermission('preferences') == 1)
                    <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">

                            @if (checkPermission('measurement_unit') == 1)
                                <a href="{{ url('measurement_unit') }}" class="nav-link">Measurement Units</a>
                            @endif
                            @if (checkPermission('employee') == 1)
                                <a href="{{ url('inquiry_types') }}" class="nav-link">Unit Types</a>
                            @endif
                            @if (checkPermission('discounts') == 1)
                                <a href="{{ url('discounts') }}" class="nav-link">Discounts</a>
                            @endif
                            @if (checkPermission('product') == 1)
                                <a href="{{ url('product') }}" class="nav-link">Product Categories</a>
                            @endif
                            @if (checkPermission('notification.list') == 1)
                                <a href="{{ route('notification.list') }}" class="nav-link">Notifications
                                    Management</a>
                            @endif
                            @if (checkPermission('invoice.list') == 1)
                                <a href="{{ route('invoice.list') }}" class="nav-link">Invoice Preferences</a>
                            @endif
                            @if (checkPermission('employee') == 1)
                                <a href="{{ url('employee') }}" class="nav-link">Employees</a>
                            @endif
                            <a href="{{ url('/cities') }}" class="nav-link">WhatsApp / SMS Casting Preferences</a>
                        </nav>
                    </li>
                @endif
            </ul>
        </div><!-- az-header-menu -->
        <div class="az-header-right">
            <!--            @if (checkPermission('inquiry/create') == 1)
<a href="{{ 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>
@endif-->
            <div class="dropdown az-header-notification">
                <a href="" class="" title="My General Notification2" 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">Accounts</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 ?> <a
                                    href="{{ 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="{{ 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 -->
