export default {
  async fetch(request) {
    const url = new URL(request.url);

    const SLUG_TO_EMBED = {
      "/": "6fc896e22d3c418a95ac08ce8c8c5d07",
      "/VPN": "0097dbc6e89e4578bd5a696c03b53d04"
    };

    const pageId = SLUG_TO_EMBED[url.pathname] || url.pathname;
    const embedUrl = `https://arinc9.notion.site/ebd/${pageId}`;

    return new Response(`<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="arinc9's Website">
  <title>arinc9's Website</title>
  <style>
    html, body { margin: 0; padding: 0; height: 100%; }
    iframe { border: none; width: 100%; height: 100%; }
  </style>
</head>
<body>
  <iframe src="${embedUrl}" allowfullscreen></iframe>
</body>
</html>`, {
      headers: {
        'content-type': 'text/html; charset=UTF-8'
      }
    });
  }
};