import { VeoWorkbench } from "@/features/veo-workbench";
import { Locale, locales, resolveLocale } from "@/config/i18n";
import { notFound } from "next/navigation";
import { loadDictionary } from "@allai/i18n/server";

type PageProps = {
  params: { locale: string };
};

export default async function VeoPage({ params }: PageProps) {
  const locale = resolveLocale(params.locale);

  if (!locales.includes(locale)) {
    notFound();
  }

  const dictionary = await loadDictionary(locale);

  return <VeoWorkbench locale={locale as Locale} dictionary={dictionary} />;
}
