import { h } from "./jsx";
import { Sidebar } from "./components/Sidebar";
import { PaliadinWidget } from "./components/PaliadinWidget";
import { BottomNav } from "./components/BottomNav";
import { Footer } from "./components/Footer";
import { PWAHead } from "./components/PWAHead";

// renderNotFound is the chromed 404 page served for any unknown
// authenticated path. Anonymous visitors are redirected to /login by the
// auth middleware before reaching the catch-all, so this never has to
// stand in for the marketing shell.
export function renderNotFound(): string {
  return "<!DOCTYPE html>" + (
    <html lang="de">
      <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
        <meta name="theme-color" content="#BFF355" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="default" />
        <PWAHead />
        <title data-i18n="notfound.title">Seite nicht gefunden &mdash; Paliad</title>
        <link rel="stylesheet" href="/assets/global.css" />
      </head>
      <body className="has-sidebar">
        <Sidebar currentPath="" />
        <BottomNav currentPath="" />

        <main>
          <section className="tool-page">
            <div className="container">
              <div className="entity-empty">
                <h2 data-i18n="notfound.heading">Seite nicht gefunden</h2>
                <p data-i18n="notfound.lede">
                  Diese Seite existiert nicht oder wurde verschoben.
                </p>
                <a href="/dashboard" className="btn-cta-lime" data-i18n="notfound.cta">
                  Zur&uuml;ck zum Dashboard
                </a>
              </div>
            </div>
          </section>
        </main>

        <Footer />
        <PaliadinWidget />
        <script src="/assets/notfound.js"></script>
      </body>
    </html>
  );
}
