/* global React */ function FAQ() { const t = window.useT(); const [openIndex, setOpenIndex] = React.useState(null); const toggle = (i) => { setOpenIndex(prev => (prev === i ? null : i)); }; const faqItemKeys = [0, 2, 3, 4, 5, 6, 7, 8, 9, 11]; const items = faqItemKeys.map((key) => ({ question: t(`faq.items.${key}.question`), answer: t(`faq.items.${key}.answer`), })); const ChevronIcon = () => ( ); return ( {/* Header */} {t('faq.header.label')} {t('faq.header.title')} {t('faq.header.description')} {/* FAQ List */} {items.map((item, i) => { const isOpen = openIndex === i; const panelId = `faq-panel-${i}`; const triggerId = `faq-trigger-${i}`; return ( toggle(i)} className="faq-trigger" style={{ width: '100%', display: 'grid', gridTemplateColumns: '52px 1fr 32px', gap: 24, alignItems: 'center', background: 'transparent', border: 'none', padding: '28px 0', textAlign: 'left', cursor: 'pointer', color: 'var(--lr-tierra-profunda)', }} > {String(i + 1).padStart(2, '0')} {item.question} {/* Animated panel — grid-rows trick avoids janky height animation */} {item.answer} ); })} ); } window.FAQ = FAQ;
{t('faq.header.description')}
{item.answer}