<!DOCTYPE html>
<html lang="en">

<head>
  <link rel="icon" type="image/png" href="/uploads/layout/favicon.png" />
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>
    <%= typeof title !=='undefined' ? title + ' | ' : '' %>CMS-GGCamp
  </title>
  <!-- Bootstrap CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" />
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
  <style>
    :root {
      --primary-color: #b8b76a;
      --primary-light: #c9c88a;
      --primary-dark: #9a994a;
    }

    .btn-primary {
      background-color: var(--primary-color);
      border-color: var(--primary-color);
      color: white;
    }

    .btn-primary:hover {
      background-color: var(--primary-dark);
      border-color: var(--primary-dark);
    }

    .nav-link:hover {
      color: var(--primary-color);
    }

    .nav-link.active {
      color: var(--primary-color);
      font-weight: 600;
    }
  </style>
  <%- style %>
</head>

<body>
  <div class="container-fluid">
    <div class="row">
      <nav class="col-md-2 d-none d-md-block bg-light sidebar">
        <div class="position-sticky pt-3">
          <ul class="nav flex-column">
            <li class="nav-item">
              <a class="nav-link" href="/admin/dashboard">Dashboard</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/home">Home</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/header">Header & Menu</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/footer">Footer</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/about">About</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/about-us">About Us</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/contact">Contact</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/appointment">Appointment</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/faq">FAQ</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/terms-conditions">Terms & Conditions</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/safety">Safety</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/camp-location">Camp Location</a>
            </li>
            <li class="nav-item">
            <li class="nav-item">
              <a class="nav-link" href="/admin/form">Form</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/admin/upload">Upload</a>
            </li>
          </ul>
        </div>
      </nav>

      <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
        <!-- Flash Messages Data (Hidden) -->
        <% if(typeof success_msg !=='undefined' || typeof error_msg !=='undefined' || typeof error !=='undefined' ) { %>
          <div id="flash-messages-data" style="display: none">
            <%- JSON.stringify({ success_msg: typeof success_msg !=='undefined' && success_msg ? success_msg : null,
              error_msg: typeof error_msg !=='undefined' && error_msg ? error_msg : null, error: typeof error
              !=='undefined' && error ? error : null }) %>
          </div>
          <% } %>

            <div class="py-3"><%- body %></div>
      </main>
    </div>
  </div>

  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
  <%- script %>
</body>

</html>