import { notFound } from "next/navigation";
import { copy, isLocale } from "@/lib/i18n";

export default async function CmsPage({
  params,
}: {
  params: Promise<{ locale: string }>;
}) {
  const resolvedParams = await params;

  if (!isLocale(resolvedParams.locale)) {
    notFound();
  }

  const t = copy[resolvedParams.locale];

  return (
    <section className="rounded-3xl border border-zinc-800 bg-zinc-900/60 p-8">
      <h1 className="text-3xl font-semibold text-zinc-50">{t.cmsTitle}</h1>
      <p className="mt-4 max-w-3xl leading-8 text-zinc-300">{t.cmsText}</p>
    </section>
  );
}
