<?php
use App\Helpers\SessionHelper;

$config = require __DIR__ . '/../../../config/config.php';
$baseUrl = $config['base_url'];
?>
<!doctype html>
<html lang="en" data-bs-theme="light">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?= htmlspecialchars($config['app_name']) ?></title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="<?= $baseUrl ?>/assets/css/style.css">
</head>
<body>
<?php include __DIR__ . '/partials/header.php'; ?>
<?php
$route = $_GET['route'] ?? 'login';
$isAuthRoute = in_array($route, ['login']);
?>
        <main class="app-main flex-grow-1 p-4 <?= $isAuthRoute ? 'auth-main' : '' ?>">
            <?php include $viewPath; ?>
        </main>
        <?php include __DIR__ . '/partials/footer.php'; ?>
    </div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="<?= $baseUrl ?>/assets/js/app.js"></script>
</body>
</html>

