'use client' import { useId, useState } from 'react' import { ChevronDown, cn } from '@sim/emcn' import { domAnimation, LazyMotion, m } from 'framer-motion' interface LandingFAQItem { question: string answer: string } interface LandingFAQProps { faqs: LandingFAQItem[] } /** * Accordion FAQ for landing pages. Answers stay mounted (collapsed via * animated height) so non-JS crawlers see the full Q&A text and FAQPage * JSON-LD always matches visible content. */ export function LandingFAQ({ faqs }: LandingFAQProps) { const baseId = useId() const [openIndex, setOpenIndex] = useState(0) const [hoveredIndex, setHoveredIndex] = useState(null) return (
{faqs.map(({ question, answer }, index) => { const isOpen = openIndex === index const showDivider = index > 0 && hoveredIndex !== index && hoveredIndex !== index - 1 const panelId = `${baseId}-faq-panel-${index}` return (

{answer}

) })}
) }