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

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

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

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