import type { Metadata } from "next";
import { PublicMenuClient } from "@/components/PublicMenuClient";
import { DEMO_RESTAURANT, DEMO_CATEGORIES } from "@/lib/demo-data";

export const metadata: Metadata = {
  title: "Gusto & Co. Brasserie | Menulio Canlı Demo Menü",
  description: "Menulio dijital QR menü altyapısı ile çalışan örnek canlı restoran menüsü.",
};

type PageProps = {
  searchParams?: Promise<{ theme?: string; table?: string }>;
};

export default async function DemoMenuPage({ searchParams }: PageProps) {
  const resolved = searchParams ? await searchParams : {};
  const theme = resolved.theme || "elegant";

  return (
    <PublicMenuClient
      restaurant={DEMO_RESTAURANT}
      categories={DEMO_CATEGORIES}
      initialThemeKey={theme}
      allowThemeSwitching={false}
    />
  );
}
