export const dynamic = "force-dynamic";
import { notFound } from "next/navigation";
import { PageHero } from "@/components/MpcBlocks";
import { LegalArticle } from "@/components/LegalArticle";
import { getAdminState } from "@/lib/admin-store";
import { getLegalPageForRoute } from "@/lib/legal-pages";
import { createPageMetadata } from "@/lib/seo";

export const metadata = createPageMetadata({
  title: "Business Listing Terms",
  description: "Read Marloth Park Central listing terms for local businesses, accommodation contacts and visitor-facing local categories.",
  path: "/supplier-terms",
  image: "/images/heroes/business-hero.webp",
  keywords: ["Marloth Park business listing", "MPC listing terms", "Marloth Park local directory"],
});

export default async function Page() {
  const state = await getAdminState();
  const page = getLegalPageForRoute(state, "supplier-terms");
  if (!page) notFound();

  return (
    <main>
      <PageHero eyebrow="Business terms" title={page.title} text="Terms for local businesses, activity providers and accommodation contacts appearing on Marloth Park Central." image="/images/heroes/business-hero.webp" />
      <LegalArticle page={page} />
    </main>
  );
}
