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.process.title} | ${dict.nav.brandName}${dict.nav.brandSub}`,
    description: dict.process.desc,
  };
}

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} />;
}
