${escapeHtml(heading)}
${subheading.length > 0 ? `${escapeHtml(subheading)}
` : ''}import type { Page, FormField } from '@/lib/schema/page'
import type { AssetManager } from '@/lib/assets/assetManager'
export type Exported = { html: string; css: string; js: string }
export type ExportOptions = {
assetManager?: AssetManager
fontPreconnect?: boolean
fontPreload?: boolean
robotsMeta?: string
imageLoading?: 'lazy' | 'eager'
imageDecoding?: 'async' | 'sync'
imageFetchPriority?: 'high' | 'low'
imageSrcset?: string
imageSizes?: string
imageAutoSizes?: boolean
imageSizesPreset?: 'mobile-first' | 'desktop-fixed'
}
function renderFaq(section: { props: { items: Array<{ q: string; a: string }> } }) {
const itemsRaw: Array<{ q: string; a: string }> = Array.isArray(section.props.items) ? section.props.items : []
const isBlank = (s: string | undefined | null) => !s || s.trim().length === 0
const items = itemsRaw
.map((it) => ({ q: (it.q || '').trim(), a: (it.a || '').trim() }))
// drop when both question and answer are blank
.filter((it) => !(isBlank(it.q) && isBlank(it.a)))
return `
${escapeHtml(it.a)} ${escapeHtml(subheading)}FAQ
${items
.map(
(it) => `
${escapeHtml(it.q)}
Features
${items.map((it) => `
Benefits
${items.map((it) => `
Testimonials
${items
.map(
(it) => `
“${escapeHtml(it.quote)}”
${it.author.length > 0 ? `${escapeHtml(heading)}
${subheading.length > 0 ? `