import Changelog from "@/components/changelog";
import { buildStaticPageMetadata } from "@/lib/seo";
import { Metadata } from "next";

type Props = { searchParams: Promise<{ lang?: string }> };

export async function generateMetadata({ searchParams }: Props): Promise<Metadata> {
  const metadata = await buildStaticPageMetadata({
    path: "/changelog",
    searchParams,
    descriptionFallback: {
      ar: "سجل تحديثات سكاي لايت شات — واتساب بزنس، هلا للمكالمات، والصندوق الموحد.",
      en: "SkyLight Chat changelog — WhatsApp Business, Halla voice, and unified inbox updates.",
    },
  });
  return {
    ...metadata,
    // Keep release notes discoverable to users but out of search until the
    // historical entries and performance claims are verified against releases.
    robots: { index: false, follow: true },
  };
}

export default function ChangelogPage() {
  return <Changelog />;
}
