<nav class="top-navbar d-flex justify-content-between align-items-center">

      <button class="btn btn-dark d-lg-none me-3"
                type="button"
                data-bs-toggle="offcanvas"
                data-bs-target="#sidebar">
            <i class="fas fa-bars"></i>
        </button>

    <h4 class="mb-0">
        @yield('page-title','Dashboard')
    </h4>

    <div class="dropdown">

        <a href="#" class="text-decoration-none dropdown-toggle text-dark" data-bs-toggle="dropdown">

            <i class="fas fa-user-circle fs-4 me-2"></i>

            {{ auth()->user()->name ?? 'Administrator' }}

        </a>

        <ul class="dropdown-menu dropdown-menu-end">

            <li>
                <a class="dropdown-item" href="#">
                    <i class="fas fa-user me-2"></i>
                    Profile
                </a>
            </li>

            <li>
                <hr class="dropdown-divider">
            </li>

            <li>
               <form action="{{ route('admin.logout') }}" method="POST">
                   @csrf
               
                   <button type="submit" class="dropdown-item">
                       Logout
                   </button>
               
               </form>
            </li>

        </ul>

    </div>

</nav>

