<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Al Rahma API — Public Docs</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.10.5/swagger-ui.min.css" />
  <style>
    html, body { height: 100%; margin: 0; background-color: #fafafa; font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
    .topbar { background-color: #15654f !important; }
    .topbar-wrapper .link { color: white !important; font-weight: 600; }
  </style>
</head>
<body>
  <div id="swagger-ui"></div>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.10.5/swagger-ui-bundle.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.10.5/swagger-ui-standalone-preset.min.js"></script>
  <script>
    window.onload = function () {
      const ui = SwaggerUIBundle({
        url: "<?= base_url('docs/openapi/master.yaml') ?>",
        dom_id: "#swagger-ui",
        deepLinking: true,
        docExpansion: "none",
        filter: true,
        tryItOutEnabled: false,
        persistAuthorization: false,
        presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
        layout: "StandaloneLayout",
      });
      const interval = setInterval(() => {
        const authBtn = document.querySelector('.authorize');
        if (authBtn) { authBtn.remove(); clearInterval(interval); }
      }, 300);
    };
  </script>
</body>
</html>
