<nav class="navbar navbar-expand-lg navbar-white bg-white">
    <button type="button" id="sidebarCollapse" class="btn btn-light">
        <i class="fas fa-bars"></i><span></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="nav navbar-nav ms-auto">
            <div id="datetime" class="current-datetime"></div>
            <li class="nav-item dropdown">
                <div class="nav-dropdown">
                    <?php if(Auth::check()): ?>
                    <a href="#" id="nav2" class="nav-item nav-link dropdown-toggle text-secondary" data-bs-toggle="dropdown" aria-expanded="false">
                        <?php if(isset(Auth::user()->image) && !empty(Auth::user()->image)): ?>
                            <img src="<?php echo e(asset(Auth::user()->image)); ?>" alt="Avatar" class="avatar-image" style="width: 21px;height: 18px;border-radius: 9px;">
                        <?php else: ?>
                            <i class="fas fa-user"></i>
                        <?php endif; ?>
                        <span><?php echo e(Auth::user()->name); ?></span>
                        <i style="font-size: .8em;" class="fas fa-caret-down"></i>
                        </a>
                        <div class="dropdown-menu dropdown-menu-end nav-link-menu" id="nav-dropdown-menu">
                            <ul class="nav-list">
                                <li><a href="<?php echo e(route('admin.profile')); ?>" class="dropdown-item"><i
                                            class="fas fa-address-card"></i> Profile</a>
                                </li>
                                <div class="dropdown-divider"></div>
                                <li>
                                    <a href="#" type="button" class="btn btn-primary dropdown-item"
                                        data-bs-toggle="modal" data-bs-target="#exampleModal">
                                        <i class="fas fa-sign-out-alt"></i> Logout
                                    </a>
                                    
                                </li>

                                
                            </ul>
                        </div>
                    <?php endif; ?>
                </div>
            </li>
        </ul>
    </div>
</nav>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Logout</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                Do you really want to logout?
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">No</button>
                <button type="button" class="btn btn-primary" id="logout-button">Logout</button>
            </div>
        </div>
    </div>
</div>

<form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" class="d-none">
    <?php echo csrf_field(); ?>
</form>
<?php /**PATH D:\laragon\www\bioessenza\resources\views/admin/layouts/header.blade.php ENDPATH**/ ?>