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

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

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

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