<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm sticky-top">
    <div class="container">
        <!-- Logo -->
        <a class="navbar-brand" href="<?php echo e(route('home')); ?>">
            <span class="bg-edunetra-yellow text-dark px-3 py-2 rounded fw-bold">
                edunetra.id
            </span>
        </a>

        <!-- Mobile Toggle -->
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
            <span class="navbar-toggler-icon"></span>
        </button>

        <!-- Navigation Links -->
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav me-auto">
                <li class="nav-item">
                    <a class="nav-link fw-semibold <?php echo e(request()->routeIs('home') ? 'active' : ''); ?>"
                       href="<?php echo e(route('home')); ?>">HOME</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link fw-semibold <?php echo e(request()->routeIs('courses.*') ? 'active' : ''); ?>"
                       href="<?php echo e(route('courses.public')); ?>">COURSES</a>
                </li>
                <?php if(auth()->guard()->check()): ?>
                    <?php if(auth()->user()->role === 'student' || auth()->user()->role === 'teacher' || auth()->user()->role === 'admin'): ?>
                        <li class="nav-item">
                            <a class="nav-link fw-semibold <?php echo e(request()->routeIs('my-courses') ? 'active' : ''); ?>"
                               href="<?php echo e(route('my-courses')); ?>">MY COURSES</a>
                        </li>
                    <?php endif; ?>
                    <?php if(auth()->user()->isTeacher() || auth()->user()->isAdmin()): ?>
                        <li class="nav-item">
                            <a class="nav-link fw-semibold <?php echo e(request()->routeIs('teacher.*') ? 'active' : ''); ?>"
                               href="<?php echo e(route('teacher.courses.index')); ?>">COURSE MANAGEMENT</a>
                        </li>
                    <?php endif; ?>
                <?php endif; ?>
                <li class="nav-item">
                    <a class="nav-link fw-semibold <?php echo e(request()->routeIs('about') ? 'active' : ''); ?>"
                       href="<?php echo e(route('about')); ?>">ABOUT US</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link fw-semibold <?php echo e(request()->routeIs('contact') ? 'active' : ''); ?>"
                       href="<?php echo e(route('contact')); ?>">CONTACT US</a>
                </li>
            </ul>

            <!-- Auth Links -->
            <ul class="navbar-nav">
                <?php if(auth()->guard()->check()): ?>
                    <!-- User Dashboard Link based on role -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                            <i class="bi bi-person-circle"></i> <?php echo e(Auth::user()->name); ?>

                        </a>
                        <ul class="dropdown-menu">
                            <?php if(auth()->user()->isAdmin()): ?>
                                <li><a class="dropdown-item" href="#"><i class="bi bi-gear"></i> Admin Panel</a></li>
                            <?php elseif(auth()->user()->isTeacher()): ?>
                                <li><a class="dropdown-item" href="<?php echo e(route('teacher.dashboard')); ?>"><i class="bi bi-speedometer2"></i> Teacher Dashboard</a></li>
                                <li><a class="dropdown-item" href="<?php echo e(route('teacher.courses.index')); ?>"><i class="bi bi-book"></i> Course Management</a></li>
                            <?php else: ?>
                            <li><a class="dropdown-item" href="<?php echo e(route('my-courses')); ?>"><i class="bi bi-journal-bookmark"></i> My Courses</a></li>
                            <?php endif; ?>
                            <li><a class="dropdown-item" href="<?php echo e(route('profile.edit')); ?>"><i class="bi bi-person"></i> Profile</a></li>
                            <li><hr class="dropdown-divider"></li>
                            <li>
                                <form method="POST" action="<?php echo e(route('logout')); ?>">
                                    <?php echo csrf_field(); ?>
                                    <button type="submit" class="dropdown-item">
                                        <i class="bi bi-box-arrow-right"></i> Log Out
                                    </button>
                                </form>
                            </li>
                        </ul>
                    </li>
                <?php else: ?>
                    <li class="nav-item">
                        <a href="<?php echo e(route('login')); ?>" class="btn btn-edunetra ms-2">
                            <i class="bi bi-box-arrow-in-right"></i> LOGIN
                        </a>
                    </li>
                <?php endif; ?>
            </ul>
        </div>
    </div>
</nav>


<?php /**PATH /Users/reihanpraja/ProjectWork/edunetra/resources/views/layouts/navigation.blade.php ENDPATH**/ ?>