<?php require_once __DIR__ . '/functions.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $pageTitle ?? 'ShadiHall - Elegant Wedding Venues'; ?></title>
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>/assets/css/style.css">
</head>
<body>
<nav class="navbar">
    <a href="<?php echo BASE_URL; ?>/index.php" class="logo" style="text-decoration:none;">
        Shadi<span>Hall</span>
    </a>
    <ul>
        <li><a href="<?php echo BASE_URL; ?>/index.php">Home</a></li>
        <li><a href="<?php echo BASE_URL; ?>/halls.php">Venues</a></li>
        <?php if (isLoggedIn()): ?>
            <?php if (getUserRole() === 'admin'): ?>
                <li><a href="<?php echo BASE_URL; ?>/admin/dashboard.php">Admin</a></li>
            <?php elseif (getUserRole() === 'vendor'): ?>
                <li><a href="<?php echo BASE_URL; ?>/vendor/dashboard.php">My Hall</a></li>
            <?php else: ?>
                <li><a href="<?php echo BASE_URL; ?>/user/dashboard.php">My Account</a></li>
            <?php endif; ?>
            <li><a href="<?php echo BASE_URL; ?>/logout.php" class="btn-nav">Logout</a></li>
        <?php else: ?>
            <li><a href="<?php echo BASE_URL; ?>/login.php">Login</a></li>
            <li><a href="<?php echo BASE_URL; ?>/register.php" class="btn-nav">Register</a></li>
        <?php endif; ?>
    </ul>
</nav>
