import { getTranslations } from "next-intl/server";
import type { Metadata } from "next";
import PricingContent from "@/components/pricing/pricing-content";

export async function generateMetadata(props: {
  params: Promise<{ locale: string }>;
}): Promise<Metadata> {
  const params = await props.params;
  const { locale } = params;
  const t = await getTranslations({ locale, namespace: "seo" });
  const siteUrl = process.env.NEXT_PUBLIC_APP_URL || "https://iddaai.com";
  const pathSegment = "pricing";

  return {
    title: t("pricing.title"),
    description: t("pricing.description"),
    alternates: {
      canonical: `${siteUrl}/${locale}/${pathSegment}`,
      languages: {
        en: `${siteUrl}/en/${pathSegment}`,
        tr: `${siteUrl}/tr/${pathSegment}`,
      },
    },
  };
}

export default function PricingPage() {
  return <PricingContent />;
}
