<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">

    <!-- Sidebar - Brand -->
    <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{route('admin')}}">
      <div class="sidebar-brand-icon rotate-n-15">
        <i class="fas fa-laugh-wink"></i>
      </div>
      <div class="sidebar-brand-text mx-3">Admin</div>
    </a>

    @if(auth()->user()->role == 'admin')
    <!-- Divider -->
    <hr class="sidebar-divider my-0">
    <!-- Nav Item - Dashboard -->
    <li class="nav-item active">
      <a class="nav-link" href="{{route('admin')}}">
        <i class="fas fa-fw fa-tachometer-alt"></i>
        <span>Dashboard</span></a>
    </li>
    @endif


    @if(auth()->user()->role == 'admin' || auth()->user()->role == 'team-coordinator' || auth()->user()->role == 'finance' || auth()->user()->role == 'agents')
    <!-- Divider -->
    <hr class="sidebar-divider">
    <!-- Heading -->
    <div class="sidebar-heading">
      Invoices
    </div>
    <li class="nav-item">
      <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseNFT" aria-expanded="true" aria-controls="collapseNFT">
        <i class="fas fa-image"></i>
        <span>Invoices </span>
      </a>
      <div id="collapseNFT" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
        <div class="bg-white py-2 collapse-inner rounded">
          <h6 class="collapse-header">Invoices:</h6>
          <a class="collapse-item" href="{{route('invoice.index')}}">Invoice List</a>
          <a class="collapse-item" href="{{route('invoice.create')}}">Add Invoice</a>
        </div>
      </div>
    </li>
    @endif

    @if(auth()->user()->role == 'admin')
    <!-- Divider -->
    <hr class="sidebar-divider">
    <!-- Heading -->
    <div class="sidebar-heading">
      Merchant Payarc
    </div>
    <li class="nav-item">
      <a href="{{ route('merchant.lists',['merchant' => 'cwp-payarc']) }}" class="nav-link" >
        <span>CWP Merchant Status </span>
      </a>
    </li>
    <li class="nav-item">
      <a href="{{ route('merchant.lists',['merchant' => 'll-payarc']) }}" class="nav-link" >
        <span>TLL Merchant Status </span>
      </a>
    </li>
    @endif


    <!-- Divider -->
    <hr class="sidebar-divider">
    <!-- Heading -->
    <div class="sidebar-heading">
      Leads
    </div>
    <li class="nav-item">
      <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseleads" aria-expanded="true" aria-controls="collapseleads">
        <i class="fas fa-image"></i>
        <span>Leads </span>
      </a>
      <div id="collapseleads" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
        <div class="bg-white py-2 collapse-inner rounded">
          <h6 class="collapse-header">Leads:</h6>
          <a class="collapse-item" href="{{route('leads.index')}}">All Leads</a>
          <a class="collapse-item" href="{{route('leads.create')}}">Add Lead</a>
        </div>
      </div>
    </li>

    @if(auth()->user()->role == 'admin')
    <!-- Divider -->
    <hr class="sidebar-divider d-none d-md-block">
     <!-- Heading -->
    <div class="sidebar-heading">
        General Settings
    </div>
     <!-- Users -->
     <li class="nav-item">
        <a class="nav-link" href="{{route('users.index')}}">
            <i class="fas fa-users"></i>
            <span>Users</span></a>
    </li>
     <!-- General settings -->
     <li class="nav-item">
        <a class="nav-link" href="{{route('settings')}}">
            <i class="fas fa-cog"></i>
            <span>Settings</span></a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="{{route('gateways.index')}}">
            <i class="fas fa-cog"></i>
            <span>Payment Gateways</span></a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="{{route('currency.index')}}">
            <i class="fas fa-cog"></i>
            <span>Currency</span></a>
    </li>
    @endif

    <!-- Sidebar Toggler (Sidebar) -->
    <div class="text-center d-none d-md-inline">
      <button class="rounded-circle border-0" id="sidebarToggle"></button>
    </div>

</ul>