import { textLink } from "./button-styles"; import HoverPrefetchLink from "./HoverPrefetchLink"; export interface FaqEntry { question: string; /** Resposta vazia = pergunta preparada, que ainda não é exibida. */ answer: string; link?: { href: string; label: string }; } /** * Perguntas frequentes em acordeão, um formato só no site: pergunta na linha, resposta ao abrir, "+" que gira. * A home (HomeFaq), as páginas de serviço e a de serviços usam este componente. Só aparecem as perguntas com resposta; sem nenhuma, a seção não existe. * Nunca escrever aqui prazo, preço, garantia ou política de pagamento que o dono não tenha dito. */ export function Faq({ items, id = "faq", title = "Perguntas frequentes", eyebrow = "Dúvidas comuns", }: { items?: readonly FaqEntry[]; /** Âncora da seção; o título leva `${id}-title`. */ id?: string; title?: string; eyebrow?: string; }) { const answered = (items ?? []).filter((item) => item.answer.trim() !== ""); if (answered.length === 0) return null; return (

{eyebrow}

{title}

{answered.map((item) => (
{item.question}

{item.answer}

{item.link ? ( {item.link.label} ) : null}
))}
); }