import { getPressSection } from "@/lib/api/press";
import { FestivalImage, FestivalInfo } from "./components";
import {
  BreadcrumbItem,
  CustomBreadcrumb,
} from "@/components/shared/CustomBreadcrumb";
import { getTranslations } from "next-intl/server";

export default async function BringFestivalSection() {
  const breadcrumbT = await getTranslations("Breadcrumb");
  const pressSection = await getPressSection();
  const breadcrumbItems: BreadcrumbItem[] = [
    { label: breadcrumbT("home"), href: "/" },
    { label: breadcrumbT("press"), isCurrentPage: true },
  ];
  return (
    <section className="flex flex-col gap-5 md:gap-10">
      <CustomBreadcrumb items={breadcrumbItems} />
      <div className="grid grid-cols-1 lg:grid-cols-2 gap-5 sm:gap-10 lg:gap-20 w-full">
        <FestivalImage
          image={pressSection?.image || null}
          title={pressSection?.title || null}
        />
        <FestivalInfo
          content={pressSection?.content || null}
          title={pressSection?.title || null}
        />
      </div>
    </section>
  );
}
