<header>
    <nav class="navbar navbar-expand-sm navbar-white bg-white header-navbar py-2 px-4 position-fixed">
        <div class="container-fluid">
            <h3 class="mb-0 header-heading">@yield('title', 'Admin Panel')</h3> 
            <a href="#" class="d-lg-none d-md-block d-block text-decoration-none text-dark" onclick="w3_open()"><i class="fa-solid fa-circle-chevron-right"></i></a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mynavbar">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse justify-content-end" id="mynavbar">
                <ul class="navbar-nav align-items-lg-center align-items-md-center align-items-start">
                    <li class="nav-item me-2">
                        <a class="nav-link bell-link" href="javascript:void(0)"><img src="{{ asset('img/bell.svg') }}" alt=""></a>
                    </li>
                    @php
                        $admin = Auth::guard('admin')->user();
                    @endphp
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="javascript:void(0)"><img src="{{ asset('img/Mask Group.png') }}" class="me-2">{{ $admin->name }}</a>
                        <ul class="dropdown-menu p-4 profile-menu border-0 shadow">
                            <div class="border-bottom">
                                <div class="dd-profile-img">
                                    <img src="{{ asset('img/dd-profile-img.png') }}" class="rounded-circle">
                                </div>
                               
                                <div class="dd-profile-text mt-3">
                                    <h4 class="profile-heading">{{ $admin->name }}</h4>
                                    <p class="mb-2 profile-text">{{ $admin->email }}</p>
                                </div>
                            </div>
                            <li><a class="dropdown-item px-0 d-flex align-items-center gap-2 py-2" href="{{ route('admin.myprofile') }}"><img src="img/profile-setting-icon.png" alt=""> Profile Settings</a></li>
                            {{-- <li><a class="dropdown-item px-0 d-flex align-items-center gap-2 py-2" href="#"><img src="img/change-psw-icon.png" alt=""> Change Password</a></li> --}}
                             <form method="POST" action="{{ route('admin.logout') }}">
                                @csrf
                                <li><a class="dropdown-item px-0 d-flex align-items-center gap-2 py-2" href="{{ route('admin.logout') }}" onclick="event.preventDefault(); this.closest('form').submit();"data-bs-toggle="modal" data-bs-target="#myModal3"><img src="img/logout-icon.png" alt=""> Logout</a></li>
                             </form>
                        </ul>
                    </li>
                </ul>
            </div>
            {{-- <div class="collapse navbar-collapse justify-content-end" id="mynavbar">
                <ul class="navbar-nav align-items-center">
                    <li class="nav-item me-2">
                        <a class="nav-link bell-link" href="javascript:void(0)"><img src="img/bell.svg" alt=""></a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="javascript:void(0)"><img src="img/Mask Group.png" alt=""> Dianne Russell</a>
                        <ul class="dropdown-menu">
                            <li><a class="dropdown-item" href="#">Link 1</a></li>
                            <li><a class="dropdown-item" href="#">Link 2</a></li>
                        </ul>
                    </li>
                </ul>
            </div> --}}
        </div>
    </nav>
</header>