<?php

declare(strict_types=1);

require_once __DIR__ . '/includes/bootstrap.php';
?><!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title><?= htmlspecialchars(APP_NAME) ?></title>

  <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-minimal/minimal.css" />
  <link rel="stylesheet" href="assets/style.css" />
</head>
<body>
  <div class="tz-app">
    <header class="tz-header">
      <div class="tz-header-inner">
        <div class="tz-brand">
          <div class="title"><?= htmlspecialchars(APP_NAME) ?></div>
          <div class="subtitle">Businesses on a map • subscribe with one click</div>
        </div>
        <div class="tz-actions">
          <button id="btnSignup" class="tz-btn">Sign up</button>
          <button id="btnLogin" class="tz-btn">Log in</button>
          <button id="btnProfile" class="tz-btn tz-btn-primary">My profile</button>
          <button id="btnBusiness" class="tz-btn">Business login</button>
          <a class="tz-btn tz-btn-ghost" href="admin.php">Admin</a>
        </div>
      </div>
    </header>

    <div id="map"></div>
  </div>

  <script>
    window.TZ_CONFIG = {
      centerLat: <?= json_encode(DEFAULT_MAP_CENTER_LAT) ?>,
      centerLng: <?= json_encode(DEFAULT_MAP_CENTER_LNG) ?>,
      zoom: <?= json_encode(DEFAULT_MAP_ZOOM) ?>
    };
  </script>
  <script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  <script src="assets/js/app.js"></script>
</body>
</html>
