<style>
    .active {
        background-color: #ff0000 !important;
    }
</style>

<nav class="z-10 flex justify-between items-center px-6 py-4 bg-gray-700 text-white shadow-lg">
    
        <div class="flex items-center">
            <img src="../images/Approval.png" alt="Logo" class="h-16 w-auto rounded shadow-md">
        </div>
    
        <!-- <div class="flex items-center">
            <img src="images/Approval.png" alt="Logo" class="h-16 w-auto rounded shadow-md">
        </div> -->


    <div class="flex-1">
        <ul class="flex justify-center gap-4 text-sm font-semibold">
                <?php
                $navLinks = [
                    'index.php' => 'Home',
                    'notification.php' => 'Notification',
                    'members.php' => 'Members',
                    'loans.php' => 'Loans',
                    'contact.php' => 'Contact',
                    'about.php' => 'About',
					
                ];
				
                ?>
            
                <!-- Temporary Members -->
            <?php if (isset($navLinks)) {
                foreach ($navLinks as $file => $label) {
                    $activeClass = (basename($_SERVER['PHP_SELF']) == $file) ? 'active' : '';
                    echo "<li><a href='$file' class='px-4 py-2 rounded hover:bg-gray-900 hover:text-white transition $activeClass'>$label</a></li>";
                }
            } ?>
        </ul>
    </div>

    <div class="ml-4">
        <ul>
        <?php 
        if (!isset($_SESSION['mpid']) || $_SESSION['mpid'] !== 1) {?>
                    <li><a href="#" onclick="login()" class="px-4 py-2 bg-blue-500 rounded hover:bg-blue-700 transition">Login</a></li>
<?php 
        } else { ?>
                    <li><a href="logout.php" class="px-4 py-2 bg-red-500 rounded hover:bg-red-700 transition">Logout</a></li>
    <?php } ?>





            <!-- <?php if (!isset($_SERVER['HTTPS'])) { ?>
                <li><a href="#" onclick="login()" class="px-4 py-2 bg-blue-500 rounded hover:bg-blue-700 transition">Login</a></li>
            <?php } else { ?>
                <li><a href="logout.php" class="px-4 py-2 bg-red-500 rounded hover:bg-red-700 transition">Logout</a></li>
            <?php } ?> -->
        </ul>
    </div>
</nav>