<!-- Test Manager -->
@if(
request()->segment(1) == 'accounts' ||
request()->segment(1) == 'contacts' ||
request()->segment(1) == 'account-titles' ||
request()->segment(1) == 'accounting-types' ||
request()->segment(1) == 'accounting-groups' ||
request()->segment(1) == 'account-categories' ||
request()->segment(1) == 'account-types' ||
request()->segment(1) == 'tax-register-categories' ||
request()->segment(1) == 'license-types' ||
request()->segment(1) == 'account-settlement-types' ||
request()->segment(1) == 'blood-groups' ||
request()->segment(1) == 'relation-types' ||
request()->segment(1) == 'genders' ||
request()->segment(1) == 'payment-modes' ||
request()->segment(1) == 'marital-statuses')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>

    @if(in_array('ACCOUNTS', $modulePermissions) && in_array('accounts-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'accounts' ? 'active' : '' }}" href="{{ route('accounts.index') }}">Accounts</a>
    </li>
    @endif

    @if(in_array('ACCOUNT_CONTACTS', $modulePermissions) && in_array('account-contacts-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'contacts' ? 'active' : '' }}" href="{{ route('contacts.index') }}">Contacts</a>
    </li>
    @endif

    @if(in_array('ACCOUNTING_TYPE', $modulePermissions) && in_array('accounting-type-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'accounting-types' ? 'active' : '' }}" href="{{ route('accounting-types.index') }}">Accounting Types</a>
    </li>
    @endif

    @if(in_array('ACCOUNTING_GROUP', $modulePermissions) && in_array('accounting-group-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'accounting-groups' ? 'active' : '' }}" href="{{ route('accounting-groups.index') }}">Accounting Groups</a>
    </li>
    @endif

    @if(in_array('ACCOUNT_CATEGORY', $modulePermissions) && in_array('account-category-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'account-categories' ? 'active' : '' }}" href="{{ route('account-categories.index') }}">Categories</a>
    </li>
    @endif

    @if(in_array('ACCOUNT_TYPE', $modulePermissions) && in_array('account-type-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'account-types' ? 'active' : '' }}" href="{{ route('account-types.index') }}">Types</a>
    </li>
    @endif

    @if(in_array('PAYMENT_MODE', $modulePermissions) && in_array('payment-mode-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'payment-modes' ? 'active' : '' }}" href="{{ route('payment-modes.index') }}">Payment Mode</a>
    </li>
    @endif

    @if(in_array('LICENSE_TYPE', $modulePermissions) && in_array('license-type-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'license-types' ? 'active' : '' }}" href="{!! route('license-types.index') !!}">License Types</a>
    </li>
    @endif

    <li>
      <div class="btn-group dropend">
        <button type="button" class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
          More<i class="bi bi-arrow-down ms-1"></i>
        </button>
        <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink">

          @if(in_array('ACCOUNT_TITLE', $modulePermissions) && in_array('account-title-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'account-titles' ? 'active' : '' }}" href="{{ route('account-titles.index') }}">Titles</a>
          </li>
          @endif

          @if(in_array('ACCOUNT_SETTLEMENT_TYPES', $modulePermissions))
            @if(in_array('account-settlement-types-list', $authRolePermissions))
            <li>
                <a class="dropdown-item {{ request()->segment(1) == 'account-settlement-types' ? 'active' : '' }}" href="{!! route('account-settlement-types.index') !!}">Settlement Type</a>
            </li>
            @endif
          @endif

          @if(in_array('TAX_REGISTER_CATEGORY', $modulePermissions))
            @if(in_array('tax-register-category-list', $authRolePermissions))
            <li>
                <a class="dropdown-item {{ request()->segment(1) == 'tax-register-categories' ? 'active' : '' }}" href="{!! route('tax-register-categories.index') !!}">Tax Register Categories</a>
                {{-- <a class="{{ request()->segment(1) == 'tax-register-categories' ? 'active' : '' }}" href="{{ route('tax-register-categories.index') }}">Tax Register Categories</a> --}}
            </li>
            @endif
          @endif

          @if(in_array('BLOOD_GROUPS', $modulePermissions) && in_array('blood-groups-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'blood-groups' ? 'active' : '' }}" href="{{ route('blood-groups.index') }}">Blood Groups</a>
          </li>
          @endif

          @if(in_array('GENDERS', $modulePermissions) && in_array('genders-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'genders' ? 'active' : '' }}" href="{{ route('genders.index') }}">Genders</a>
          </li>
          @endif

          @if(in_array('MARITAL_STATUS', $modulePermissions) && in_array('marital-status-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'marital-statuses' ? 'active' : '' }}" href="{{ route('marital-statuses.index') }}">Marital Statuses</a>
          </li>
          @endif

          @if(in_array('RELATION_TYPES', $modulePermissions) && in_array('relation-types-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'relation-types' ? 'active' : '' }}" href="{{ route('relation-types.index') }}">Relation Types</a>
          </li>
          @endif

        </ul>
      </div>
    </li>
  </ul>
</nav>
<!-- End Of Accounts -->




<!-- Products -->
@elseif(
request()->segment(1) == 'products' ||
request()->segment(1) == 'product-alternative-units' ||
request()->segment(1) == 'product-attribute-types' ||
request()->segment(1) == 'product-attributes' ||
request()->segment(1) == 'product-brands' ||
request()->segment(1) == 'product-categories' ||
request()->segment(1) == 'product-groups' ||
request()->segment(1) == 'product-item-types' ||
request()->segment(1) == 'product-warehouse' ||
request()->segment(1) == 'product-packaging' ||
request()->segment(1) == 'business-divisions' ||
request()->segment(1) == 'primary-units' ||
request()->segment(1) == 'product-location-rack' ||
request()->segment(1) == 'price-settings'||
request()->segment(1) == 'tax-categories' ||
request()->segment(1) == 'tax-masters' ||
request()->segment(1) == 'tax-masters-sub' ||
request()->segment(1) == 'rack-locations' ||
request()->segment(1) == 'tax-calculation')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>

    @if(in_array('PRODUCT', $modulePermissions) && in_array('product-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'products' ? 'active' : '' }}" href="{{ route('products.index') }}">Products</a>
    </li>
    @endif

    @if(in_array('PRIMARY_UNIT', $modulePermissions) && in_array('primary-unit-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'primary-units' ? 'active' : '' }}" href="{{ route('primary-units.index') }}">Primary Units</a>
    </li>
    @endif

    @if(in_array('PRODUCT_ALTERNATIVE_UNITS', $modulePermissions) && in_array('product-alternative-units-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'product-alternative-units' ? 'active' : '' }}" href="{{ route('product-alternative-units.index') }}">Alternative Units</a>
    </li>
    @endif

    @if(in_array('PRODUCT_BRANDS', $modulePermissions) && in_array('product-brands-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'product-brands' ? 'active' : '' }}" href="{{ route('product-brands.index') }}">Brands</a>
    </li>
    @endif

    @if(in_array('PRODUCT_CATEGORY', $modulePermissions) && in_array('product-category-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'product-categories' ? 'active' : '' }}" href="{{ route('product-categories.index') }}">Category</a>
    </li>
    @endif

    @if(in_array('PRODUCT_GROUPS', $modulePermissions) && in_array('product-groups-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'product-groups' ? 'active' : '' }}" href="{{ route('product-groups.index') }}">Group</a>
    </li>
    @endif

    @if(in_array('PRODUCT_ITEM_TYPES', $modulePermissions) && in_array('product-item-types-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'product-item-types' ? 'active' : '' }}" href="{{ route('product-item-types.index') }}">Item Type</a>
    </li>
    @endif

    <li>
      <a class="{{ request()->segment(1) == 'product-packaging' ? 'active' : '' }}" href="{{ route('product-packaging.index') }}">Product packaging</a>
    </li>

    @if(in_array('PRODUCT_ATTRIBUTES', $modulePermissions) && in_array('product-attributes-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'product-attributes' ? 'active' : '' }}" href="{{ route('product-attributes.index') }}">Attributes</a>
    </li>
    @endif

    @if(in_array('TAX_MASTER', $modulePermissions) && in_array('tax-masters-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'tax-masters' ? 'active' : '' }}" href="{{ route('tax-masters.index') }}">Tax Masters</a>
    </li>
    @endif

    {{-- @if(in_array('tax-master-sub-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'tax-masters-sub' ? 'active' : '' }}" href="{{ route('tax-sub-masters.index') }}">Tax Master Sub</a>
    </li>
    @endif --}}

    @if(in_array('TAX_CATEGORY', $modulePermissions) && in_array('tax-category-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'tax-categories' ? 'active' : '' }}" href="{{ route('tax-categories.index') }}">Tax Category</a>
    </li>
    @endif


    {{-- @if(in_array('tax-calculation-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'tax-calculation' ? 'active' : '' }}" href="{{ route('tax-calculation.index') }}">Tax Calculations</a>
    </li>
    @endif --}}


    {{-- @if(in_array('product-business-divisions-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'business-divisions' ? 'active' : '' }}" href="{{ route('business-divisions.index') }}">Business Divisions</a>
    </li>
    @endif --}}
    <li>
      <div class="btn-group dropend">
        <button type="button" class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> More<i style="" class="bi bi-arrow-down ms-1"></i>
        </button>
        <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink">
          @if(in_array('PRODUCT_BUSINESS_DIVISIONS', $modulePermissions) && in_array('product-business-divisions-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'business-divisions' ? 'active' : '' }}" href="{{ url('business-divisions') }}">Business Divisions</a>
          </li>
          @endif

          @if(in_array('PRICE_SETTING', $modulePermissions) && in_array('price-setting-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'price-settings' ? 'active' : '' }}" href="{{ url('price-settings') }}">Price Settings</a>
          </li>
          @endif

          @if(in_array('PRODUCT_ATTRIBUTE_TYPES', $modulePermissions) && in_array('product-attribute-types-list', $authRolePermissions))
        <li>
            <a class="dropdown-item {{ request()->segment(1) == 'product-attribute-types' ? 'active' : '' }}" href="{{ url('product-attribute-types') }}">Attributes Types</a>
        {{-- <a class="{{ request()->segment(1) == 'product-attribute-types' ? 'active' : '' }}" href="{{ route('product-attribute-types.index') }}">Attributes Types</a> --}}
        </li>
        @endif

          @if(in_array('PRODUCT_WAREHOUSE', $modulePermissions) && in_array('product-warehouse-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'product-warehouse' ? 'active' : '' }}" href="{{ url('product-warehouse') }}">Warehouse</a>
          </li>
          @endif

          @if(in_array('PRODUCT_LOCATION_RACK', $modulePermissions) && in_array('product-location-rack-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'product-location-rack' ? 'active' : '' }}" href="{{ url('product-location-rack') }}">Rack</a>
          </li>
          @endif
          {{-- @if(in_array('PRODUCT_LOCATION_RACK', $modulePermissions) && in_array('product-location-rack-list', $authRolePermissions)) --}}
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'rack-locations' ? 'active' : '' }}" href="{{ url('rack-locations') }}">Rack Location</a>
          </li>
          {{-- @endif --}}

        </ul>
      </div>
    </li>
  </ul>
</nav>
<!-- End Of Products -->

<!-- Academic -->
@elseif(
request()->segment(1) == 'companies' ||
request()->segment(1) == 'license' ||
request()->segment(1) == 'establishment-types' ||
request()->segment(1) == 'letter-heads')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>

    @if(in_array('COMPANY', $modulePermissions) && in_array('company-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'companies' ? 'active' : '' }}" href="{{ url('companies') }}">Company</a>
    </li>
    @endif

    @if(in_array('COMPANY_DOCUMENTS', $modulePermissions) && in_array('company-documents-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'license' ? 'active' : '' }}" href="{{ route('license.index') }}">Documents Type</a>
    </li>
    @endif

    @if(in_array('COMPANY_ESTABLISHMENT_TYPES', $modulePermissions) && in_array('company-establishment-types-edit', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'establishment-types' ? 'active' : '' }}" href="{{ route('establishment-types.index') }}">Establishment Type</a>
    </li>
    @endif


    {{--@if(in_array('LETTER_HEADS', $modulePermissions) && in_array('letter-heads-list', $authRolePermissions)) --}}
    <li>
      <a class="{{ request()->segment(1) == 'letter-heads' ? 'active' : '' }}" href="{{ route('letter-heads.index') }}"> Letter Heads</a>
    </li>
    {{-- @endif--}}
   

  </ul>
</nav>
<!-- End Of Tax Company -->

<!-- Opd Appointment -->
@elseif(
request()->segment(1) == 'payment-terms' ||
request()->segment(1) == 'users' ||
request()->segment(1) == 'roles' ||
request()->segment(1) == 'financialyear' ||
request()->segment(1) == 'modules' ||
request()->segment(1) == 'software-branding' ||
request()->segment(1) == 'global-tags' ||
request()->segment(1) == 'master-settings' ||
request()->segment(1) == 'user-types' ||
request()->segment(1) == 'advance-settings' ||
// request()->segment(1) == 'run-migrations' ||
request()->segment(1) == 'setting-languages' ||
request()->segment(1) == 'date-formats' ||
request()->segment(1) == 'time-formats' ||
request()->segment(1) == 'currencies' ||
request()->segment(1) == 'timezones' ||
request()->segment(1) == 'cities' ||
request()->segment(1) == 'countries' ||
request()->segment(1) == 'states' ||
request()->segment(1) == 'license-authentications' ||
request()->segment(1) == 'delivery-types' ||
request()->segment(1) == 'shipping-risk' ||
request()->segment(1) == 'tax-paid-by' ||
request()->segment(1) == 'transportation-mode' ||
request()->segment(1) == 'transport-type' ||
request()->segment(1) == 'rate-calculation-type' ||
request()->segment(1) == 'fuel-type' ||
request()->segment(1) == 'additional-charge' ||
request()->segment(1) == 'container-size' ||
request()->segment(1) == 'container-type' ||
request()->segment(1) == 'cargo-types' ||
request()->segment(1) == 'container-return-status' ||
request()->segment(1) == 'custom-clearance-status' ||
request()->segment(1) == 'consignment-booking-status' ||
request()->segment(1) == 'organization-department')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>

    {{-- @if(in_array('migrate-tables', $authRolePermissions))
    <li>
      <a href="{{ url('run-migrations') }}">Migrate Tables</a>
    </li>
    @endif --}}



    @if(in_array('USERS', $modulePermissions) && in_array('users-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'users' ? 'active' : '' }}" href="{{ url ('users')}}">Users</a>
    </li>
    @endif

    @if(in_array('ROLES', $modulePermissions) && in_array('role-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'roles' ? 'active' : '' }}" href="{{ route('roles.index') }}">Role & Permission</a>
    </li>
    @endif

    @if(in_array('FINANCIAL_YEAR', $modulePermissions) && in_array('financial-year-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'financialyear' ? 'active' : '' }}" href="{{ url('financialyear') }}">Financial Years</a>
    </li>
    @endif

    @if(in_array('MODULES', $modulePermissions) && in_array('modules-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'modules' ? 'active' : '' }}" href="{{ url('modules') }}">Modules</a>
    </li>
    @endif

    @if(in_array('VOUCHERS_MASTER', $modulePermissions) && in_array('vouchers-master-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'vouchers-master' ? 'active' : '' }}" href="{{ url('vouchers-master') }}">Voucher Master</a>
    </li>
    @endif

    @if(in_array('SOFTWARE_BRANDING', $modulePermissions) && in_array('software-branding-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'software-branding' ? 'active' : '' }}" href="{{ url('software-branding') }}">Software Branding</a>
    </li>
    @endif

    @if(in_array('MASTER_SETTINGS', $modulePermissions) && in_array('master-settings-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'master-settings' ? 'active' : '' }}" href="{{ url('master-settings') }}">Master Settings</a>
    </li>
    @endif

    @if(in_array('USER_TYPES', $modulePermissions) && in_array('user-types-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'user-types' ? 'active' : '' }}" href="{{ url('user-types') }}">User Types</a>
    </li>
    @endif


    @if(in_array('LICENSE_AUTHENTICATIONS', $modulePermissions) && in_array('license-authentications-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'license-authentications' ? 'active' : '' }}" href="{{ url('license-authentications') }}">License Authentications</a>
    </li>
    @endif

    <li>
      <div class="btn-group dropend">
        <button type="button" class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
          More<i class="bi bi-arrow-down ms-1"></i>
        </button>
        <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink">

          @if(in_array('PAYMENT_TERM', $modulePermissions) && in_array('payment-term-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'payment-terms' ? 'active' : '' }}" href="{{ route('payment-terms.index') }}">Payment Term</a>
          </li>
          @endif

          @if(in_array('TAGS', $modulePermissions) && in_array('global-tags-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'global-tags' ? 'active' : '' }}" href="{{ route('global-tags.index') }}">Tags</a>
          </li>
          @endif


          @if(in_array('ADVANCE SETTINGS', $modulePermissions) && in_array('advance-settings-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'advance-settings' ? 'active' : '' }}" href="{{ url('advance-settings') }}">Advance Settings</a>
          </li>
          @endif

          @if(in_array('ORGANIZATION_DEPARTMENT', $modulePermissions) && in_array('organization-department-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'organization-department' ? 'active' : '' }}" href="{{ url('organization-department') }}">Organization Department</a>
          </li>
          @endif
          @if(in_array('SETTINGS_LANGUAGE', $modulePermissions) && in_array('settings-language-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'setting-languages' ? 'active' : '' }}" href="{{ url('setting-languages') }}">Setting Languages</a>
          </li>
          @endif
          @if(in_array('DATE_FORMAT', $modulePermissions) && in_array('date-format-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'date-formats' ? 'active' : '' }}" href="{{ url('date-formats') }}">Date Format</a>
          </li>
          @endif
          @if(in_array('TIME_FORMAT', $modulePermissions) && in_array('time-format-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'time-formats' ? 'active' : '' }}" href="{{ url('time-formats') }}">Time Format</a>
          </li>
          @endif
          @if(in_array('CURRENCIES', $modulePermissions) && in_array('currencies-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'currencies' ? 'active' : '' }}" href="{{ url('currencies') }}">Currencies</a>
          </li>
          @endif
          @if(in_array('TIMEZONES', $modulePermissions) && in_array('timezones-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'timezones' ? 'active' : '' }}" href="{{ url('timezones') }}">Timezones</a>
          </li>
          @endif
          {{-- @if(in_array('TIMEZONES', $modulePermissions) && in_array('timezones-list', $authRolePermissions)) --}}
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'countries' ? 'active' : '' }}" href="{{ url('countries') }}">Countries</a>
          </li>
          {{-- @endif --}}
          {{-- @if(in_array('TIMEZONES', $modulePermissions) && in_array('timezones-list', $authRolePermissions)) --}}
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'states' ? 'active' : '' }}" href="{{ url('states') }}">States</a>
          </li>
          {{-- @endif --}}
          {{-- @if(in_array('TIMEZONES', $modulePermissions) && in_array('timezones-list', $authRolePermissions)) --}}
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'cities' ? 'active' : '' }}" href="{{ url('cities') }}">Cities</a>
          </li>
          {{-- @endif --}}

           @if(in_array('DELIVERY_TYPE', $modulePermissions) && in_array('delivery-types-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'delivery-types' ? 'active' : '' }}" href="{{ url('delivery-types') }}">Delivery Types</a>
          </li>
           @endif
           @if(in_array('SHIPPING_RISK', $modulePermissions) && in_array('shipping-risk-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'shipping-risk' ? 'active' : '' }}" href="{{ url('shipping-risk') }}">Shipping Risk</a>
          </li>
           @endif
            @if(in_array('TAX_PAID_BY', $modulePermissions) && in_array('tax-paid-by-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'tax-paid-by' ? 'active' : '' }}" href="{{ url('tax-paid-by') }}">Tax Paid By</a>
          </li>
           @endif
          @if(in_array('TRANSPORTATION_MODE', $modulePermissions) && in_array('transportation-mode-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'transportation-mode' ? 'active' : '' }}" href="{{ url('transportation-mode') }}">Transportation Mode</a>
          </li>
          @endif
         @if(in_array('RATE_CALCULATION_TYPE', $modulePermissions) && in_array('rate-calculation-type-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'rate-calculation-type' ? 'active' : '' }}" href="{{ url('rate-calculation-type') }}">Rate Calculation Types</a>
          </li>
           @endif

         @if(in_array('ADDITIONAL_CHARGES', $modulePermissions) && in_array('additional-charges-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'additional-charge' ? 'active' : '' }}" href="{{ url('additional-charge') }}">Additional Charges</a>
          </li>
          @endif

           @if(in_array('FUEL_TYPE', $modulePermissions) && in_array('fuel-type-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'fuel-type' ? 'active' : '' }}" href="{{ url('fuel-type') }}">Fuel Types</a>
          </li>
          @endif

           @if(in_array('CONTAINER_SIZE', $modulePermissions) && in_array('container-size-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'container-size' ? 'active' : '' }}" href="{{ url('container-size') }}">Container Size</a>
          </li>
          @endif

          @if(in_array('CONTAINER_TYPE', $modulePermissions) && in_array('container-type-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'container-type' ? 'active' : '' }}" href="{{ url('container-type') }}">Container Types</a>
          </li>
          @endif

          @if(in_array('CARGO_TYPES', $modulePermissions) && in_array('cargo-types-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'cargo-types' ? 'active' : '' }}" href="{{ url('cargo-types') }}">Cargo Types</a>
          </li>
          @endif

          @if(in_array('CONTAINER_RETURN_STATUS', $modulePermissions) && in_array('container-return-status-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'container-return-status' ? 'active' : '' }}" href="{{ url('container-return-status') }}">Container Return Status</a>
          </li>
          @endif


          @if(in_array('CUSTOM_CLEARANCE_STATUS', $modulePermissions) && in_array('custom-clearance-status-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'custom-clearance-status' ? 'active' : '' }}" href="{{ url('custom-clearance-status') }}">Custom Clearance Status</a>
          </li>
          @endif

          @if(in_array('CONSIGNMENT_BOOKING_STATUS', $modulePermissions) && in_array('consignment-booking-status-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'consignment-booking-status' ? 'active' : '' }}" href="{{ url('consignment-booking-status') }}">Consignment Booking Status</a>
          </li>
          @endif

          @if(in_array('TRANSPORT_TYPE', $modulePermissions) && in_array('transport-type-list', $authRolePermissions))
          <li>
            <a class="dropdown-item {{ request()->segment(1) == 'transport-type' ? 'active' : '' }}" href="{{ url('transport-type') }}">Transport Type</a>
          </li>
          @endif
        </ul>
      </div>
    </li>
  </ul>
</nav>
<!-- End Of Settings -->

<!-- API Management -->
@elseif(
request()->segment(1) == 'storage-settings' ||
request()->segment(1) == 'e-invoice-settings' ||
request()->segment(1) == 'e-way-bill-api-settings' ||
request()->segment(1) == 'smstemplate' ||
request()->segment(1) == 'e-mail-apis' ||
request()->segment(1) == 'abdm-apis' ||
request()->segment(1) == 'abdm-api-calls' ||
request()->segment(1) == 'meta-mint-apis' ||
request()->segment(1) == 'api-management')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>

    @if(in_array('API_MANAGEMENT', $modulePermissions) && in_array('api-management-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'api-management' ? 'active' : '' }}" href="{{ url('api-management') }}">API Management</a>
    </li>
    @endif

    @if(in_array('SMS_API', $modulePermissions) && in_array('smstemplate-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'smstemplate' ? 'active' : '' }}" href="{{ url('smstemplate') }}">SMS Settings</a>
    </li>
    @endif

    @if(in_array('SMS_API', $modulePermissions) && in_array('storage-settings-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'storage-settings' ? 'active' : '' }}" href="{{ url('storage-settings') }}">Storage Setting</a>
    </li>
    @endif
    {{-- @if(in_array('storage-settings-list', $authRolePermissions)) --}}
    <li>
      <a class="{{ request()->segment(1) == 'e-invoice-settings' ? 'active' : '' }}" href="{{ url('e-invoice-settings') }}">E Invoice Settings</a>
    </li>
    {{-- @endif --}}
    {{-- @if(in_array('storage-settings-list', $authRolePermissions)) --}}
    <li>
      <a class="{{ request()->segment(1) == 'e-way-bill-api-settings' ? 'active' : '' }}" href="{{ url('e-way-bill-api-settings') }}">E Way Bill API Settings</a>
    </li>
    {{-- @endif --}}
    {{-- @if(in_array('storage-settings-list', $authRolePermissions)) --}}
    <li>
      <a class="{{ request()->segment(1) == 'e-mail-apis' ? 'active' : '' }}" href="{{ url('e-mail-apis') }}">Email API </a>
    </li>
    {{-- @endif --}}

    @if(in_array('abdm-apis-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'abdm-apis' ? 'active' : '' }}" href="{{ url('abdm-apis') }}">ABDM Apis </a>
    </li>
    @endif


    @if(in_array('abdm-api-calls-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'abdm-api-calls' ? 'active' : '' }}" href="{{ url('abdm-api-calls') }}">ABDM Api Calls </a>
    </li>
    @endif


    @if(in_array('meta-mint-api-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'meta-mint-apis' ? 'active' : '' }}" href="{{ url('meta-mint-apis') }}">Meta Mint API </a>
    </li>
    @endif
  </ul>
</nav>
<!-- End Of API Management -->

<!-- Medical Settings -->
@elseif(
request()->segment(1) == 'body-vitals')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
    @if(in_array('BODY_VITALS', $modulePermissions) && in_array('body-vitals-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'body-vitals' ? 'active' : '' }}" href="{{ route('body-vitals.index') }}">Body Vitals</a>
    </li>
    @endif

  </ul>
</nav>
<!-- End Of Medical Settings -->
@elseif(
request()->segment(1) == 'journal-voucher'||
request()->segment(1) == 'receipt-voucher'||
request()->segment(1) == 'contra-vouchers'||
request()->segment(1) == 'payment-voucher'||
request()->segment(1) == 'findings'||
request()->segment(1) == 'finding-categories'||
request()->segment(1) == 'operations'||
request()->segment(1) == 'all-transactions' ||
request()->segment(1) == 'operation-categories'||
request()->segment(1) == 'trial-balance' ||
request()->segment(1) == 'profit-and-loss' ||
request()->segment(1) == 'balance-sheet')
<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>

    @if(in_array('Receipt_VOUCHER', $modulePermissions) && in_array('receipt-voucher-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'receipt-voucher' ? 'active' : '' }}" href="{{ route ('receipt-voucher.index') }}">Receipt Voucher</a>
    </li>
    @endif

    @if(in_array('PAYMENT_VOUCHER', $modulePermissions) && in_array('payment-voucher-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'payment-voucher' ? 'active' : '' }}" href="{{ route ('payment-voucher.index') }}">Payment Voucher</a>
    </li>
    @endif

    @if(in_array('JOURNAL_VOUCHER', $modulePermissions) && in_array('journal-voucher-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'journal-voucher' ? 'active' : '' }}" href="{{ route ('journal-voucher.index') }}">Journal Voucher</a>
    </li>
    @endif

    @if(in_array('CONTRA_VOUCHER', $modulePermissions) && in_array('contra-voucher-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'contra-vouchers' ? 'active' : '' }}" href="{{ route ('contra-vouchers.index') }}">Contra Voucher</a>
    </li>
    @endif

    @if(in_array('Receipt_VOUCHER', $modulePermissions) ||
      in_array('PAYMENT_VOUCHER', $modulePermissions) ||
      in_array('JOURNAL_VOUCHER', $modulePermissions) ||
      in_array('CONTRA_VOUCHER', $modulePermissions)
    )
    @if(in_array('receipt-voucher-list', $authRolePermissions) ||
      in_array('payment-voucher-list', $authRolePermissions) ||
      in_array('journal-voucher-list', $authRolePermissions) ||
      in_array('contra-voucher-list', $authRolePermissions)
    )
    <li>
      <a class=" {{ request()->segment(1) == 'all-transactions' ? 'active' : '' }}" href="{!! route('all-transactions.index') !!}">All Transactions</a>
    </li>
    @endif
    @endif

    <li>
      <a class=" {{ request()->segment(1) == 'trial-balance' ? 'active' : '' }}" href="{!! route('trial-balance') !!}">Trial Balance</a>
    </li>
    <li>
      <a class=" {{ request()->segment(1) == 'profit-and-loss' ? 'active' : '' }}" href="{!! route('profitAndLoss') !!}">Profit And Loss</a>
    </li>
    <li>
      <a class=" {{ request()->segment(1) == 'balance-sheet' ? 'active' : '' }}" href="{!! route('balanceSheet') !!}">Balance Sheet</a>
    </li>
  </ul>
</nav>
@elseif(
request()->segment(1) == 'vouchers-master'||
request()->segment(1) == 'voucher-types'||
request()->segment(1) == 'voucher-track-status' ||
request()->segment(1) == 'voucher-series')
<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>

    @if(in_array('VOUCHERS_MASTER', $modulePermissions) && in_array('vouchers-master-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'vouchers-master' ? 'active' : '' }}" href="{{ route ('vouchers-master.index') }}">Voucher Master</a>
    </li>
    @endif
    {{-- @if(in_array('voucher-types-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'voucher-types' ? 'active' : '' }}" href="{{ route ('voucher-types.index') }}">Voucher Types</a>
    </li>
    @endif --}}
    @if(in_array('VOUCHER_SERIES', $modulePermissions) && in_array('voucher-series-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'voucher-series' ? 'active' : '' }}" href="{{ route ('voucher-series.index') }}">Voucher Series</a>
    </li>
    @endif

    @if(in_array('VOUCHER_TRACK_STATUS', $modulePermissions) && in_array('voucher-track-status-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'voucher-track-status' ? 'active' : '' }}" href="{{ route('voucher-track-status.index') }}">Voucher Track Status</a>
    </li>
    @endif

  </ul>
</nav>


@elseif(
request()->segment(1) == 'license-registered'||
request()->segment(1) == 'license-dashboard'||
request()->segment(1) == 'product-features'||
request()->segment(1) == 'user-license'||
request()->segment(1) == 'customer-list'||
request()->segment(1) == 'industry-type'||
request()->segment(1) == 'plan-and-packages'||
request()->segment(1) == 'user-license-validity'||
request()->segment(1) == 'biling-interval'||
request()->segment(1) == 'license-details'||
request()->segment(1) == 'server')
<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
    <li>
      <a class="{{ request()->segment(1) == 'license-dashboard' ? 'active' : '' }}" href="{{ route ('license.dashboard') }}">Dashboard</a>
    </li>
    @if(in_array('LICENSE_REGISTERED', $modulePermissions) && in_array('license-registered-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'license-registered' ? 'active' : '' }}" href="{{ route ('license-register.index') }}">License Register</a>
    </li>
    @endif
    @if(in_array('CUSTOMER', $modulePermissions) && in_array('customer-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'customer-list' ? 'active' : '' }}" href="{{ route ('customer-list.index') }}">Customer List</a>
    </li>
    @endif
    @if(in_array('PLANE_AND_PACKAGES', $modulePermissions) && in_array('plan-and-packages-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'plan-and-packages' ? 'active' : '' }}" href="{{ route ('plan-and-packages.index') }}">Plan & Packages</a>
    </li>
    @endif
    @if(in_array('INDUSTRY_TYPE', $modulePermissions) && in_array('industry-type-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'industry-type' ? 'active' : '' }}" href="{{ route ('industry-type.index') }}">Industry Type</a>
    </li>
    @endif
    @if(in_array('PRODUCT_FEATURE', $modulePermissions) && in_array('product-feature-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'product-features' ? 'active' : '' }}" href="{{ route ('product-features.index') }}">Product Features</a>
    </li>
    @endif
    @if(in_array('CLIENT_LICENSE', $modulePermissions) && in_array('client-license-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'user-license' ? 'active' : '' }}" href="{{ route ('user-license.index') }}">Client License</a>
    </li>
    @endif
    @if(in_array('CLIENT_LICENSE_VALIDITY', $modulePermissions) && in_array('client-license-validity-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'user-license-validity' ? 'active' : '' }}" href="{{ route ('user-license-validity.index') }}">License Validity</a>
    </li>
    @endif
    {{--@if(in_array('license-details-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'license-details' ? 'active' : '' }}" href="{{ route('license-details.index') }}">Licence Details</a>
    </li>
    @endif --}}

    <li>
        <div class="btn-group dropend">
          <button type="button" class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
            More<i class="bi bi-arrow-down ms-1"></i>
          </button>
          <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink">
            @if(in_array('BILLING_INTERVAL', $modulePermissions))
            @if(in_array('billing-interval-list', $authRolePermissions))
            <li>
                <a class="dropdown-item {{ request()->segment(1) == 'biling-interval' ? 'active' : '' }}" href="{{ route('biling-interval.index') }}">Billing Interval</a>
            </li>
            @endif
            @endif
            @if(in_array('SERVER', $modulePermissions))
            @if(in_array('server-list', $authRolePermissions))
            <li>
                <a class="dropdown-item {{ request()->segment(1) == 'server' ? 'active' : '' }}" href="{{ route('server.index') }}">Server</a>
            </li>
            @endif
            @endif

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

  </ul>
</nav>
<!-- website managment -->
@elseif(
request()->segment(1) == 'sliders'||
request()->segment(1) == 'content-category' ||
request()->segment(1) == 'content-sub-category'||
request()->segment(1) == 'public-content' ||
request()->segment(1) == 'photos-gallery' ||
request()->segment(1) == 'videos-gallery' ||
request()->segment(1) == 'pages-setting' ||
request()->segment(1) == 'notices' ||
request()->segment(1) == 'social-media' ||
request()->segment(1) == 'faqs' ||
request()->segment(1) == 'services' ||
request()->segment(1) == 'blogs' ||
request()->segment(1) == 'blog-categories' ||
request()->segment(1) == 'testimonials' ||
request()->segment(1) == 'file-manager' ||
request()->segment(1) == 'teams'        ||
request()->segment(1) == 'branches'     ||
request()->segment(1) == 'brands-logo'  ||
request()->segment(1) == 'career-vacancy'  ||
request()->segment(1) == 'job-application'  ||
request()->segment(1) == 'news-letter'
)
<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
    @if(in_array('NOTICE', $modulePermissions) && in_array('notice-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'notices' ? 'active' : '' }}" href="{{ route ('notices.index') }}">Notices</a>
    </li>
    @endif
    @if(in_array('WEBSITE_PAGES_SETTINGS', $modulePermissions) && in_array('website-pages-settings-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'pages-setting' ? 'active' : '' }}" href="{{ route ('pages-setting.index') }}">Web Pages</a>
    </li>
    @endif
    @if(in_array('WEBSITE_SLIDER', $modulePermissions) && in_array('website-slider-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'sliders' ? 'active' : '' }}" href="{{ route ('sliders.index') }}">Sliders</a>
    </li>
    @endif
    @if(in_array('WEBSITE_PHOTO_GALLERY', $modulePermissions) && in_array('website-photo-gallery-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'photos-gallery' ? 'active' : '' }}" href="{{ route ('photos-gallery.index') }}">Photo Gallery</a>
    </li>
    @endif
    @if(in_array('WEBSITE_VIDEO_GALLERY', $modulePermissions) && in_array('website-video-gallery-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'videos-gallery' ? 'active' : '' }}" href="{{ route ('videos-gallery.index') }}">Video Gallery</a>
    </li>
    @endif
    @if(in_array('WEBSITE_SERVICES', $modulePermissions) && in_array('website-services-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'services' ? 'active' : '' }}" href="{{ route ('services.index') }}">Services</a>
      </li>
    @endif
    @if(in_array('WEBSITE_BLOGS', $modulePermissions) && in_array('website-blogs-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'blogs' ? 'active' : '' }}" href="{{ route ('blogs.index') }}">Blogs</a>
      </li>
    @endif
    @if(in_array('WEBSITE_CONTENT', $modulePermissions) && in_array('website-content-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'public-content' ? 'active' : '' }}" href="{{ route ('public-content.index') }}">Public Content</a>
    </li>
    @endif
    @if(in_array('WEBSITE_CONTENT_CATEGORY', $modulePermissions) && in_array('website-content-category-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'content-category' ? 'active' : '' }}" href="{{ route ('content-category.index') }}">Main Category</a>
    </li>
    @endif
    @if(in_array('WEBSITE_CONTENT_SUB_CATEGORY', $modulePermissions) && in_array('website-content-sub-category-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'content-sub-category' ? 'active' : '' }}" href="{{ route ('content-sub-category.index') }}">Sub Category</a>
    </li>
    @endif
   
   
    @if(in_array('FILE-MANAGER', $modulePermissions) && in_array('file-manager-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'file-manager' ? 'active' : '' }}" href="{{ route ('file-manager.index') }}">File Manager</a>
    </li>
    @endif

    <li>
      <div class="btn-group dropend">
        <button type="button" class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
          More<i class="bi bi-arrow-down ms-1"></i>
        </button>
        <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink">
          @if(in_array('WEBSITE_SOCIAL_MEDIA', $modulePermissions) && in_array('website-social-media-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'social-media' ? 'active' : '' }} dropdown-item" href="{{ route ('social-media.index') }}">Social Media</a>
          </li>
          @endif
          @if(in_array('WEBSITE_FAQ', $modulePermissions) && in_array('website-faq-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'faqs' ? 'active' : '' }} dropdown-item" href="{{ route ('faqs.index') }}">FAQ</a>
          </li>
          @endif
          @if(in_array('WEBSITE_SERVICES', $modulePermissions) && in_array('website-services-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'services' ? 'active' : '' }} dropdown-item" href="{{ route ('services.index') }}">Services</a>
          </li>
          @endif
          @if(in_array('WEBSITE_BLOGS', $modulePermissions) && in_array('website-blogs-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'blogs' ? 'active' : '' }} dropdown-item" href="{{ route ('blogs.index') }}">Blogs</a>
          </li>
          @endif
          @if(in_array('BLOG_CATEGORIES', $modulePermissions) && in_array('blog-categories-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'blog-categories' ? 'active' : '' }} dropdown-item" href="{{ route ('blog-categories.index') }}">Blogs Categories</a>
          </li>
          @endif
          @if(in_array('WEBSITE_TESTIMONIALS', $modulePermissions) && in_array('website-testimonials-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'testimonials' ? 'active' : '' }} dropdown-item" href="{{ route ('testimonials.index') }}">Testimonials</a>
          </li>
          @endif
          @if(in_array('WEBSITE_TEAMS', $modulePermissions) && in_array('website-teams-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'teams' ? 'active' : '' }} dropdown-item" href="{{ route ('teams.index') }}">Teams</a>
          </li>
          @endif
          @if(in_array('BRANCHES', $modulePermissions) && in_array('branch-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'branches' ? 'active' : '' }} dropdown-item" href="{{ route ('branches.index') }}">Branches</a>
          </li>
          @endif
          @if(in_array('BRANDS_LOGO', $modulePermissions) && in_array('brands-logo-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'brands-logo' ? 'active' : '' }} dropdown-item" href="{{ route ('brands-logo.index') }}">Brand Logo</a>
          </li>
          @endif
          <li>
            <a class="{{ request()->segment(1) == 'news-letter' ? 'active' : '' }} dropdown-item" href="{{ route ('news-letter.index') }}">News Letters</a>
          </li>
          @if(in_array(' CAREER_VACANCY', $modulePermissions) && in_array('career-vacancy-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'career-vacancy' ? 'active' : '' }} dropdown-item" href="{{ route ('career-vacancy.index') }}">Career Vacancies</a>
          </li>
          @endif
          @if(in_array('JOB_APPPLICATION', $modulePermissions) && in_array('job-application-list', $authRolePermissions))
          <li>
            <a class="{{ request()->segment(1) == 'job-application' ? 'active' : '' }} dropdown-item" href="{{ route ('job-application.index') }}">Job Application</a>
          </li>
          @endif
        </ul>
      </div>
    </li>


  </ul>
</nav>

@elseif(
request()->segment(1) == 'marketing' ||
request()->segment(1) == 'business-categories')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
    @if(in_array('MARKETING', $modulePermissions) && in_array('marketing-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'marketing' ? 'active' : '' }}" href="{{ route('marketing.index') }}">Marketing List</a>
    </li>
    @endif
    @if(in_array('BUSINESS_CATEGORY', $modulePermissions) && in_array('business-category-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'business-categories' ? 'active' : '' }}" href="{{ route('business-categories.index') }}">Business Category</a>
    </li>
    @endif
@elseif(
request()->segment(1) == 'projects' ||
request()->segment(1) == 'project-types'||
request()->segment(1) == 'budget-types'||
request()->segment(1) == 'tasks'||
request()->segment(1) == 'project-budget')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>

    @if(in_array('PROJECTS', $modulePermissions) && in_array('projects-list', $authRolePermissions))
    <li>
        <a class="{{ request()->segment(1) == 'projects' ? 'active' : '' }}" href="{{ route('projects.index') }}">Projects</a>
    </li>
    @endif

    @if(in_array('PROJECT_TYPE', $modulePermissions) && in_array('project-type-list', $authRolePermissions))
    <li>
        <a class="{{ request()->segment(1) == 'project-types' ? 'active' : '' }}" href="{{ route('project-types.index') }}">Project Type</a>
    </li>
    @endif
    @if(in_array('BUDGET_TYPES', $modulePermissions) && in_array('budget-types-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'budget-types' ? 'active' : '' }}" href="{{ route('budget-types.index') }}">Budget Type</a>
    </li>
    @endif

  </ul>
</nav>
<!-- End Of marketing -->

<!-- Library Management -->
@elseif(
request()->segment(1) == 'designation'||
request()->segment(1) == 'employee'||
request()->segment(1) == 'employee-type')

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
    @if(in_array('EMPLOYEE', $modulePermissions) && in_array('employee-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'employee' ? 'active' : '' }}" href="{{ route('employee.index') }}">Employee</a>
    </li>
    @endif
    @if(in_array('Designation', $modulePermissions) && in_array('designation-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'designation' ? 'active' : '' }}" href="{{ route('designation.index') }}">Designation</a>
    </li>
    @endif

    @if(in_array('EMPLOYEE_TYPE', $modulePermissions) && in_array('employee-type-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'employee-type' ? 'active' : '' }}" href="{{ route('employee-type.index') }}">Employee Type</a>
    </li>
    @endif
  </ul>
</nav>
<!-- Library Management -->
<!-- Start of lab reporting -->
@elseif(
request()->segment(1) == 'queue-manager'
)

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
      <li>
        <a class="{{ request()->segment(2) == 'doctor-display' ? 'active' : '' }}" href="{{ route('queue-manager.index') }}">Doctor Display</a>
      </li>
      <li>
        <a class="{{ request()->segment(2) == 'patient-display' ? 'active' : '' }}" href="{{ route('queue-manager.index') }}">Patient Display</a>
      </li>

  </ul>
</nav>



@elseif(
request()->segment(1) == 'sale' ||
request()->segment(1) == 'sale-return'
)

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
      <li>
        <a class="{{ request()->segment(1) == 'sale' ? 'active' : '' }}" href="{{ route('sale.index') }}">Sales</a>
      </li>
      @if(in_array('sale-return-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'sale-return' ? 'active' : '' }}" href="{{ route('sale-return.index') }}">Sale Returns</a>
      </li>
      @endif
      

  </ul>
</nav>


@elseif(
request()->segment(1) == 'purchase' 
)

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
      @if(in_array('purchase-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'purchase' ? 'active' : '' }}" href="{{ route('purchase.index') }}">Purchase</a>
      </li>
      @endif
      

  </ul>
</nav>

@elseif(
request()->segment(1) == 'inventory-stock' ||
request()->segment(1) == 'stock-movement-type' ||
request()->segment(1) == 'stock-in'         ||
request()->segment(1) == 'stock-out'        || 
request()->segment(1) == 'opening-stock'    ||
request()->segment(1) ==  'stock-short-list'
)

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
    @if(in_array('inventory-stock-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'inventory-stock' ? 'active' : '' }}" href="{{ route('inventory-stock.index') }}">Inventory & Stock</a>
      </li>
    @endif
    @if(in_array('stock-in-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'stock-in' ? 'active' : '' }}" href="{{ route('stock-in.index') }}">Stock In</a>
      </li>
    @endif
    @if(in_array('stock-out-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'stock-out' ? 'active' : '' }}" href="{{ route('stock-out.index') }}">Stock Out</a>
      </li>
    @endif
    @if(in_array('stock-short-list-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'stock-short-list' ? 'active' : '' }}" href="{{ route('stock-short-list.index') }}">Shortlist</a>
      </li>
    @endif
    @if(in_array('stock-movement-type-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'stock-movement-type' ? 'active' : '' }}" href="{{ route('stock-movement-type.index') }}">Stock Movement Type</a>
      </li>
    @endif
    @if(in_array('opening-stock-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'opening-stock' ? 'active' : '' }}" href="{{ route('opening-stock.index') }}">Opening Stock</a>
      </li>
    @endif
      
  </ul>
</nav>


@elseif(
request()->segment(1) == 'vehicle-register' ||
request()->segment(1) == 'vehicle-types' ||
request()->segment(1) == 'vehicle-document-types' 
)

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
     
    @if(in_array('vehicle-register', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'vehicle-register' ? 'active' : '' }}" href="{{ route('vehicle-register') }}">Vehicle Register </a>
      </li>
    @endif
      <li>
        <a class="{{ request()->segment(1) == 'vehicle-types' ? 'active' : '' }}" href="{{ route('vehicle-types.index') }}">Vehicle Types</a>
      </li> 
      <li>
        <a class="{{ request()->segment(1) == 'vehicle-document-types' ? 'active' : '' }}" href="#">Document Types</a>
      </li>
      
  </ul>
</nav>



{{--Task Manager--}}
@elseif(
request()->segment(1) == 'task-manager' ||
request()->segment(1) == 'task-groups' ||
request()->segment(1) == 'pipeline-stages' ||
request()->segment(1) == 'task-teams' ||
request()->segment(1) == 'task-types'|| 
request()->segment(1) == 'task-priority'||
request()->segment(1) == 'task-status' ||
request()->segment(1) == 'task-charges'
)

<nav class="table_menu">
  <ul class="NavMenu">
    <li><i class="bi bi-list"></i></li>
     
    @if(in_array('task-manager-list', $authRolePermissions))
      <li>
        <a class="{{ request()->segment(1) == 'task-manager' ? 'active' : '' }}" href="{{ route('task-manager.index') }}">Task Manager </a>
      </li>
    @endif
      <li>
        <a class="{{ request()->segment(1) == 'task-groups' ? 'active' : '' }}" href="{{ route('task-groups.index') }}">Task Groups</a>
      </li> 

      <li>
        <a class="{{ request()->segment(1) == 'pipeline-stages' ? 'active' : '' }}" href="{{ route('pipeline-stages.index') }}">Task Stages</a>
      </li> 
      <li>
        <a class="{{ request()->segment(1) == 'task-teams' ? 'active' : '' }}" href="{{ route('task-teams.index') }}">Task Teams</a>
      </li> 
      
    @if(in_array('TASK_PRIORITY', $modulePermissions) && in_array('task-priority-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'task-priority' ? 'active' : '' }}" href="{{ route('task-priority.index') }}">Task Priority</a>
    </li>
    @endif

    @if(in_array('TASK_TYPE', $modulePermissions) && in_array('task-type-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'task-types' ? 'active' : '' }}" href="{{ route('task-types.index') }}">Task Type</a>
    </li>
    @endif
    {{-- @if(in_array('project-type-list', $authRolePermissions)) --}}
    <li>
        <a class="{{ request()->segment(1) == 'task-charges' ? 'active' : '' }}" href="{{ route('task-charges.index') }}">Task Charges</a>
    </li>
    {{-- @endif --}}
    @if(in_array('TASK_STATUS', $modulePermissions) && in_array('task-status-list', $authRolePermissions))
    <li>
      <a class="{{ request()->segment(1) == 'task-status' ? 'active' : '' }}" href="{{ route('task-status.index') }}">Task Status</a>
    </li>
    @endif
      
  </ul>
</nav>

@endif
