import { getDictionary } from "@/get-dictionary";
import type { Locale } from "@/i18n-config";
import ProcessClient from "@/components/ProcessClient";

export async function generateMetadata({ params }: { params: Promise<{ lang: Locale }> }) {
  const { lang } = await params;
  const dict = await getDictionary(lang);
  return {
    title: dict.meta.process.title,
    description: dict.meta.process.desc,
    alternates: {
      canonical: `/${lang}/process`,
    },
  };
}

export default async function ProcessPage({ params }: { params: Promise<{ lang: Locale }> }) {
  const { lang } = await params;
  const dict = await getDictionary(lang);

  return <ProcessClient lang={lang} dict={dict} />;
}
