"use client";

/**
 * Static, translated terms of use — the fallback used when the CMS has no
 * published `terms` page (`GET /pages/terms/` returns 404). Ported from the
 * legacy React app (`fursa_frontend/src/components/TermsOfUse.tsx`).
 *
 * The sections themselves are data (`termsSections.ts`); this file is the page
 * frame around them.
 */
import { useTranslation } from "react-i18next";
import InfoPageLayout from "./InfoPageLayout";
import TermsSectionBlock from "./TermsSectionBlock";
import { TERMS_SECTIONS } from "./termsSections";

export default function TermsOfUse() {
  const { t } = useTranslation();

  return (
    <InfoPageLayout kind="terms" title={t("TERMS.TITLE")}>


        {TERMS_SECTIONS.map((section, index) => (
          <TermsSectionBlock
            key={section.headingKey ?? `section-${index}`}
            section={section}
          />
        ))}
    </InfoPageLayout>
  );
}
