import React from 'react'; import type { Faq } from '../../types/faq'; import { type FaqSchemaOptions } from './json-ld'; export interface FaqSectionProps { /** * SSR hydrate. When provided, the hook skips the first client fetch (per * useSelfFetch contract). The consuming server page resolves FAQs then drills * them into this prop — the lib never re-fetches what the host already gated on. */ initialFaqs?: Faq[]; /** Both required together for entity-attached FAQs; partial → bare /api/faqs. */ entityType?: string; entityId?: number | string; /** * Heading node above the grouped list. `undefined` → default * `

`"Frequently Asked Questions". `null` → no heading (the host page * owns the `

`, as the standalone /faqs surface does). A React node lets a * platform drill its own without the lib referencing platform * state. Also drives category nesting so the document outline stays correct: * `null` → categories render `

` (directly under the page `

`); * otherwise categories render `

` beneath this heading. */ heading?: React.ReactNode | null; /** Inject FAQPage schema.org JSON-LD as a