<nav class="navbar navbar-default yamm navbar-fixed-top">
    <div class="container-fluid">
        {{--<button type="button" class="navbar-minimalize minimalize-styl-2  pull-left "><i class="fa fa-bars"></i>
        </button>--}}
        <!--<span style="" class="search-icon"><i class="fa fa-search"></i></span>-->
        <div class="search" style="display: none;">
            <form role="form">
                <input type="text" class="form-control" autocomplete="off"
                       placeholder="Write something and press enter">
                <span class="search-close"><i class="fa fa-times"></i></span>
            </form>
        </div>
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <a class="navbar-brand" href="{{ route('dashboard') }}">{{ $business_name->name }}</a>
            <!--<span class="badge badge-danger"><?php /*echo $userRole; */ ?></span>-->
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li><a href="{{ route('dashboard') }}" class="button-wave">ڈیش بورڈ</a></li>
                <li id="cash-report-top">
                    <a class="button-wave" href="{{ route('opening_balance_index') }}">اوپنینگ بیلنس</a>
                </li>
                @can('view trip')
                    <li class="" id="trips-top">
                        <a href="{{ route('trip_index') }}" class="button-wave">ٹرپس</a>
                    </li>
                @endcan
                <li class="dropdown" id="mega">
                    <a href="#" class="dropdown-toggle button-wave" data-toggle="dropdown" aria-expanded="true">
                        ماسٹر<span class="caret"></span></a>
                    <ul class="dropdown-menu mega-dropdown-menu">
                        <li>
                            <div class="yamm-content">
                                <ul class="list-unstyled ">

                                    @can('view city')
                                        <li><a href="{{ route('city_index') }}">شہر</a></li>
                                    @endcan
                                    @can('view pump')
                                        <li><a href="{{ route('pump_index') }}">پمپس</a></li>
                                    @endcan
                                    @can('view broker')
                                        <li><a href="{{ route('broker_index') }}">بروکرز</a></li>
                                    @endcan
                                    {{-- @can('view customer')
                                        <li><a href="{{ route('customer_index') }}">کسٹمرز</a></li>
                                    @endcan --}}
                                    {{-- @can('view supplier')
                                        <li><a href="{{ route('supplier_index') }}">سپلائرز</a></li>
                                    @endcan --}}
                                    @can('view driver')
                                        <li><a href="{{ route('driver_index') }}">ڈرائیورز</a></li>
                                    @endcan
                                    @can('view vehicle')
                                        <li><a href="{{ route('vehicle_index') }}">گاڑیاں</a></li>
                                    @endcan
                                </ul>
                                <ul class="list-unstyled ">

                                    @can('view employee')
                                        <li><a href="{{ route('employee_index') }}">ملازم</a></li>
                                    @endcan
                                    @hasrole('super admin')
                                    <li><a href="{{ route('user_index') }}">سسٹم صارفین</a>
                                    </li>
                                    @endhasrole
                                    @can('view bank')
                                        <li><a href="{{ route('bank_index') }}">بینک</a>
                                        </li>
                                    @endcan
                                    @can('view account category')
                                        <li><a href="{{ route('category_account_index') }}">اکاوؑنٹ کیٹیگری</a>
                                        </li>
                                    @endcan
                                    @can('view other account')
                                        <li><a href="{{ route('other_account_index') }}">دیگر اکاؤنٹس</a>
                                        </li>
                                    @endcan
                                </ul>

                            </div>
                        </li>

                    </ul>
                </li>
                {{-- <li class="dropdown" id="mega">
                    <a href="#" class="dropdown-toggle button-wave" data-toggle="dropdown" aria-expanded="true">
                        مینٹیننس <span class="caret"></span></a>
                    <ul class="dropdown-menu mega-dropdown-menu">
                        <li>
                            <div class="yamm-content">
                                <ul class="list-unstyled">

                                    @can('view claim maintenance')
                                        <li class="active">
                                            <a href="{{ route('vehicle_claim_index') }}">گاڑی کلیم</a>
                                        </li>
                                    @endcan
                                    @can('view tyre maintenance')

                                        <li class="active">
                                            <a href="{{ route('type_maintenance_index') }}">ٹائر مینٹیننس واؤچرز</a>
                                        </li>
                                    @endcan
                                    @can('view document maintenance')
                                        <li class="active">
                                            <a href="{{ route('document_maintenance_index') }}">کاغذات مینٹیننس</a>
                                        </li>
                                    @endcan
                                    @can('view maintenance')
                                        <li class="active">
                                            <a href="{{ route('maintenance_index') }}">مینٹیننس واؤچرز</a>
                                        </li>
                                    @endcan
                                </ul>
                            </div>
                        </li>
                    </ul>
                </li> --}}
                <li class="dropdown" id="mega">
                    <a href="#" class="dropdown-toggle button-wave" data-toggle="dropdown" aria-expanded="true">
                        لین دین<span class="caret"></span></a>
                    <ul class="dropdown-menu mega-dropdown-menu">
                        <li>
                            <div class="yamm-content">
                                <ul class="list-unstyled">
                                    @can('view general voucher')
                                        <li class="active">
                                            <a href="{{ route('journal_voucher_index') }}">جرنل واؤچرز</a>
                                        </li>
                                    @endcan
                                   {{-- @can('view salary voucher')
                                 <li class="active">
                                   <a href="{{ route('slips.index') }}">تنخواہ کے واؤچرز</a>
                                        </li>
                                    @endcan --}}
                                     @can('view salary voucher')
                                        <li class="active">
                                            <a href="{{ route('salary-slips.index') }}">تنخواہ کے واؤچرز</a>
                                        </li>
                                    @endcan
                                    @can('view receipt voucher')
                                        <li class="active">
                                            <a href="{{ route('receipt_index') }}">کیش/بینک وصولی واؤچرز</a>
                                        </li>
                                    @endcan
                                    @can('view payment voucher')
                                        <li class="active">
                                            <a href="{{ route('payment_index') }}">کیش/بینک ادائیگی واؤچرز</a>
                                        </li>
                                    @endcan

                                    @can('view payment voucher')
                                    <li class="active">
                                        <a href="{{ route('broker_advance_index') }}">ایڈوانس بقایا</a>
                                    </li>
                                @endcan
                                @can('view payment voucher')
                                <li class="active">
                                    <a href="{{ route('broker_reach_index') }}"> پہنچ بقایا  </a>
                                </li>
                            @endcan


                                </ul>
                            </div>
                        </li>
                    </ul>
                </li>

                {{-- <li class="dropdown" id="mega">
                    <a href="#" class="dropdown-toggle button-wave" data-toggle="dropdown" aria-expanded="true">
                        خریداری
                        <span class="caret"></span></a>
                    <ul class="dropdown-menu mega-dropdown-menu">
                        <li>
                            <div class="yamm-content">
                                <ul class="list-unstyled">
                                    @can('view vehicle purchase')
                                        <li class="active">
                                            <a href="{{ route('vehicle_purchase_index') }}">گاڑیوں کی خریداری</a>
                                        </li>
                                    @endcan
                                    @can('view vehicle purchase installment')
                                        <li class="active">
                                            <a href="{{ route('purchase_installment_index') }}">خریداری کی قسطیں </a>
                                        </li>
                                    @endcan
                                </ul>
                            </div>
                        </li>
                    </ul>
                </li> --}}
                <li><a href="{{ route('todo_index') }}" class="button-wave">یاد دہانی کی فہرست</a></li>
                {{-- <li class="dropdown" id="mega">
                    <a href="#" class="dropdown-toggle button-wave" data-toggle="dropdown" aria-expanded="true">
                        خرید/فروخت<span class="caret"></span></a>
                    <ul class="dropdown-menu mega-dropdown-menu">
                        <li>
                            <div class="yamm-content">
                                <ul class="list-unstyled">
                                    @can('view product category')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_product_category_index') }}">پروڈکٹ
                                                قسم</a></li>
                                    @endcan
                                    @can('view product')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_product_index') }}">پروڈکٹس</a></li>
                                    @endcan
                                    @can('view supplier')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_supplier_index') }}">سپلائر</a>
                                        </li>
                                    @endcan
                                    @can('view purchase')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_purchase_index') }}">خرید</a></li>
                                    @endcan
                                    @can('view sales')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_sale_index') }}">فروخت</a></li>
                                    @endcan
                                    @can('view supplier payment')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_supplier_payment_index') }}">سپلائر
                                                ادائیگی</a></li>
                                    @endcan
                                    @can('view customer payment')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_customer_payment_index') }}">کسٹمر
                                                وصولی</a></li>
                                    @endcan

                                </ul>
                            </div>
                        </li>
                    </ul>
                </li> --}}
                <li class="dropdown" id="mega">
                    <a href="#" class="dropdown-toggle button-wave" data-toggle="dropdown" aria-expanded="true">
                        رپورٹس<span class="caret"></span></a>
                    <ul class="dropdown-menu mega-dropdown-menu">
                        <li>
                            <div class="yamm-content">
                                <ul class="list-unstyled">
                                    @can('view reports')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('report_trip') }}">ٹرپ رپورٹ</a>


                                        </li>
                                    @endcan
                                    {{-- @can('view reports')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('report_maintenance') }}">مینٹینینس رپورٹ</a></li>
                                    @endcan --}}
                                    @can('view reports')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('report_khataJat') }}"> کھاتہ جات رپورٹ</a>

                                            <br>
                                                 <a class="" href="{{ route('report_gariBachtKhata') }}"> • گاڑی بچت کھاتہ</a><br>
                                                 <a class="" href="{{ route('report_BrokerLainDain') }}">•   بروکر لین دین</a><br>
                                                 <a class="" href="{{ route('report_pumpLainDain') }}">• پمپ لین دین</a><br>
                                        </li>
                                    @endcan
                                    {{-- @can('view purchase')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_purchase_index') }}">خرید</a></li>
                                    @endcan
                                    @can('view sales')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_sale_index') }}">فروخت</a></li>
                                    @endcan
                                    @can('view supplier payment')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_supplier_payment_index') }}">سپلائر
                                                ادائیگی</a></li>
                                    @endcan
                                    @can('view customer payment')

                                        <li class="active">
                                            <a class="nav-link" href="{{ route('pos_customer_payment_index') }}">کسٹمر
                                                وصولی</a></li>
                                    @endcan --}}

                                </ul>
                            </div>
                        </li>
                    </ul>
                </li>

                {{-- @can('view reports')
                    <li id="cash-report-top">
                        <a class="button-wave" href="{{ route('report_index') }}">رپورٹس</a>
                    </li>
                @endcan --}}
                <!--<li class="dropdown" id="entries-top">
                    <a href="#" class="dropdown-toggle button-wave" data-toggle="dropdown" role="button"
                       aria-haspopup="true" aria-expanded="false">Entries <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="senders.php">Senders</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="receivers.php">Receivers</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="receiver_fares.php">Fares</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="vehicles.php">Vehicles</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="settings.php">Settings</a></li>
                    </ul>
                </li>-->
                {{-- <li class="" id="create-trip-top">
                    <a href="{{ route('trip_create') }}" class="button-wave">Generate Trip</a>
                </li> --}}

                <!--<li class="" id="invoices-top">
                    <a href="invoices.php?start_date=<?php /*echo $startOfMonth; */?>&end_date=<?php /*echo $dateE; */?>"
                       class="button-wave">Receiver Invoices</a>
                </li>-->



                <!--<li id="receive-top">
                    <a class="button-wave" href="receivings.php?start_date=<?php /*echo $dateE; */?>&end_date=<?php /*echo $dateE; */?>">Receivings</a>
                </li>
                <li id="exp-top">
                    <a class="button-wave" href="expenses.php?start_date=<?php /*echo $dateE; */?>&end_date=<?php /*echo $dateE; */?>">Expenses</a>
                </li>-->
                <!--<li id="chat-top">
                    <a class="button-wave" href="chat.php">Chat
                        <span class="badge badge-xs badge-danger badge-top">4</span>
                    </a>
                </li>-->


            </ul>


            <ul class="nav navbar-nav navbar-right navbar-top-drops">
                {{-- <li>
                     <a href="{{ route('pos_dashboard') }}" class="button-wave btn btn-warning btn-sm">
                         POS
                     </a>
                 </li>--}}
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle button-wave waves-effect waves-button waves-light"
                       data-toggle="dropdown"><i class="fa fa-bell"></i>
                        <span class="badge badge-xs badge-info">{{ number_format($tomorrow_todos->count(),0) }}</span>
                    </a>
                    <ul class="dropdown-menu dropdown-lg" style="overflow: scroll; height: 200px;">
                        <li class="notify-title">
                            Tomorrow ({{ date("F j, Y", strtotime('tomorrow')) }}) Task List
                        </li>
                        @forelse($tomorrow_todos as $todo)
                            <li class="clearfix" style=" margin-left:10px;border-bottom: 1px solid #eeeeee">
                                <span><b><u>{{ $loop->iteration }}:</u></b></span>
                                <span style="text-align: center !important;">
                                 @php
                                     $len = strlen($todo->task);
                                            if ($len > 90) {
                                                $task = substr($todo->task, 0, 90) . '....';
                                            } else {
                                                $task =$todo->task;
                                            }
                                 @endphp
                                    {{ $task }}
                                </span>
                            </li>
                        @empty
                            <li class="clearfix" style=" margin-left:10px;border-bottom: 1px solid #eeeeee">
                                <span style="text-align: center !important;"> No Task Tomorrow <a
                                        href="{{ route('todo_index') }}"
                                        class="btn btn-link text-info">Add Some Tasks</a></span>
                            </li>
                        @endforelse
                    </ul>
                </li>

                <li>
                    <a href="{{ route('profile') }}" class="button-wave">
                        <!--<i class="fa fa-user-secret"></i>-->
                        <img class="mt-0" src="{{ asset('assets/images/user-profile.jpeg') }}">
                        <span class="badge badge-xs badge-warning">Me</span>
                    </a>
                </li>

                <li>
                    <a href="{{ route('logout') }}"
                       onclick="event.preventDefault();document.getElementById('logout_form').submit();"
                       class="button-wave border">
                        <i class="fa fa-sign-out"></i> لاگ آوٹ &nbsp;&nbsp;
                        <span class="badge badge-xs badge-danger">باہر</span>
                    </a>
                    <form action="{{ route('logout') }}" id="logout_form" method="POST" class="d-none">
                        @csrf
                    </form>
                </li>
            </ul>
        </div>
    </div>
</nav>
