"use client"; import { useState } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { MaterialIcon } from "./MaterialIcon"; const EASE = [0.22, 1, 0.36, 1] as [number, number, number, number]; export type FAQItem = { question: string; answer: string; }; type FAQAccordionProps = { items: FAQItem[]; }; export function FAQAccordion({ items }: FAQAccordionProps) { const [openIndex, setOpenIndex] = useState(null); return (
{items.map((item, index) => (
{openIndex === index && (

{item.answer}

)}
))}
); }