import { LandingImage } from "@/components/landing-image";
import { NolaGlitchClientOnly } from "@/components/nola-glitch";
import { Sosmed } from "@/components/sosmed";
import HomeText from "@/components/texts/home.mdx"

import Link from "@/components/link";
import { FakeWindow, HomeWindows } from "@/components/windows";
import { WindowManagerProvider } from "@/hooks/window-manager";

export default function Home() {
  return (<>
    <main className="flex items-center pt-16 md:pt-24 pb-12 px-8 md:px-0 overflow-x-hidden">
      <WindowManagerProvider>
        <FakeWindow windowText="Homepage">
          <HomeWindows />
          <header className="text-center mb-8">
            <h1 className="font-bold text-3xl leading-normal">
              Nonszy Work<span className="text-primary">space</span>
            </h1>
          </header>
          <noscript>
            <LandingImage />
          </noscript>
          <NolaGlitchClientOnly />
          <Sosmed />
          <article className="space-y-5 leading-relaxed relative text-sm">
            <HomeText />
          </article>
          <section className="my-8">
            <p>⚡ Powered with <Link href="https://www.cloudflare.com/" target="_blank">Cloudflare</Link> ☁️</p>
          </section>
          <footer className="mt-20 text-center">
            <p>&copy; <span className="text-sm">2025 Nomi Nonszy</span></p>
            <p className="text-sm">
              <Link href={"/terms"}>Terms</Link> and <Link href={"/privacy"}>Privacy</Link>
            </p>
          </footer>
        </FakeWindow>
      </WindowManagerProvider>
    </main>
  </>);
}
