import { GalleryGrid } from "@/components/GalleryGrid";
import type { Locale } from "@/i18n/routing";
import { getGalleryImages } from "@/lib/site";
import { getTranslations } from "next-intl/server";

type Props = { params: Promise<{ locale: string }> };

export default async function GalleryPage({ params }: Props) {
  const { locale } = await params;
  const t = await getTranslations("gallery");
  const images = await getGalleryImages();

  return (
    <div className="mx-auto max-w-6xl px-4 py-12 md:px-6 md:py-16">
      <h1 className="font-[family-name:var(--font-display)] text-4xl text-foreground">
        {t("title")}
      </h1>
      <p className="mt-3 max-w-2xl text-muted">{t("subtitle")}</p>
      <GalleryGrid images={images} locale={locale as Locale} />
    </div>
  );
}
