<?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) ?> • Admin</title>

  <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-page">
    <div class="tz-card">
      <div class="tz-topbar">
        <div>
          <h1 class="tz-h1">Business CRUD</h1>
          <div id="adminSub" class="tz-muted">Log in as an admin to manage businesses.</div>
        </div>
        <div class="tz-actions">
          <a class="tz-btn tz-btn-ghost" href="index.php">Back to map</a>
          <button id="btnAdminLogin" class="tz-btn">Log in</button>
          <button id="btnAddBusiness" class="tz-btn tz-btn-primary">Add business</button>
          <button id="btnAdminLogout" class="tz-btn tz-danger">Log out</button>
        </div>
      </div>

      <div id="adminBody">
        <div class="tz-muted">Loading…</div>
      </div>
    </div>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  <script src="assets/js/admin.js"></script>
</body>
</html>
