import { getDictionary, Locale } from "../../dictionaries";
import SSSClient from "./SSSClient";

export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }) {
  const { lang } = await params;
  const dict = await getDictionary(lang as Locale);
  return {
    title: dict.seo.faq.title,
    description: dict.seo.faq.description,
    alternates: {
      canonical: `/${lang}/sss`,
    },
  };
}

export default async function SSSPage({
  params,
}: {
  params: Promise<{ lang: string }>;
}) {
  const { lang } = await params;
  const locale = lang as Locale;
  const dict = await getDictionary(locale);

  return <SSSClient lang={locale} dict={dict} />;
}
