import type { Metadata } from "next";
import LandingPageClient from "./LandingPageClient";
import {
  SoftwareApplicationJsonLd,
  BreadcrumbJsonLd,
  WebPageJsonLd,
} from "@/components/seo";
import { getLandingMode } from "@/lib/landing-mode";

const BASE_URL = "https://llmhosts.com";

export const metadata: Metadata = {
  title: "LLMHosts — Your GPU, Real AI Infrastructure, From Anywhere",
  description:
    "Turn your home GPU into production AI infrastructure. OpenAI + Anthropic compatible proxy with intelligent routing, verified semantic cache, and remote access. One command, zero config.",
  alternates: {
    canonical: BASE_URL,
  },
  openGraph: {
    title: "LLMHosts — Your GPU, Real AI Infrastructure, From Anywhere",
    description:
      "One command. Zero config. Turn your home GPU into production AI infrastructure accessible from anywhere. Save 30-50% on AI costs.",
    url: BASE_URL,
    siteName: "LLMHosts",
    type: "website",
    images: [
      {
        url: `${BASE_URL}/og?page=home`,
        width: 1200,
        height: 630,
        alt: "LLMHosts — Turn your GPU into production AI infrastructure",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "LLMHosts — Your GPU, Real AI Infrastructure",
    description:
      "Turn your home GPU into production AI infrastructure. OpenAI + Anthropic compatible. Save 30-50% on AI costs.",
    images: [`${BASE_URL}/og?page=home`],
  },
};

export default async function LandingPage() {
  const mode = await getLandingMode();

  return (
    <>
      <SoftwareApplicationJsonLd />
      <BreadcrumbJsonLd
        items={[{ name: "Home", url: BASE_URL }]}
      />
      <WebPageJsonLd
        name="LLMHosts — Your GPU, Real AI Infrastructure, From Anywhere"
        description="Turn your home GPU into production AI infrastructure. OpenAI + Anthropic compatible proxy with intelligent routing, verified semantic cache, and remote access."
        url={BASE_URL}
      />
      <LandingPageClient mode={mode} />
    </>
  );
}
