{"version":3,"file":"FAQTest.M4Gjo7FE.mjs","names":["React.useState","React.useRef"],"sources":["https:/framerusercontent.com/modules/bOoc0NQI6AmNak0JSXGI/FM9Ae0L5lUxbPlupruZp/FAQTest.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function FAQAccordion({items,accordionMode,borderColor,caretColor,questionColor,answerColor,backgroundColor}){const[openIndex,setOpenIndex]=React.useState(null);const[openStates,setOpenStates]=React.useState([]);React.useEffect(()=>{setOpenStates(Array(items.length).fill(false));},[items.length]);const toggleAccordion=index=>{setOpenIndex(openIndex===index?null:index);};const toggleFree=index=>{setOpenStates(prev=>{const newStates=[...prev];newStates[index]=!newStates[index];return newStates;});};return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"8px\"},children:items.map((item,i)=>/*#__PURE__*/_jsx(FAQQuestion,{question:item.question,answer:item.answer,isOpen:accordionMode?openIndex===i:openStates[i],onToggle:()=>accordionMode?toggleAccordion(i):toggleFree(i),isLast:i==items.length-1,borderColor:borderColor,caretColor:caretColor,questionColor:questionColor,answerColor:answerColor,backgroundColor:backgroundColor},i))});}// --- Inner FAQQuestion component (stateless) ---\nfunction FAQQuestion({question,answer,isOpen,onToggle,isLast,borderColor,caretColor,questionColor,answerColor,backgroundColor='\"#19191962\"'}){const contentRef=React.useRef(null);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",border:`1px solid ${borderColor}`,borderRadius:\"12px\",//borderBottom: isLast ? \"\" : `1px solid ${borderColor}`,\npadding:\"16px 12px\",cursor:\"pointer\",backgroundColor:backgroundColor},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"12px\"},onClick:onToggle,children:[/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",style:{transform:isOpen?\"rotate(180deg)\":\"rotate(0deg)\",transition:\"transform 0.3s ease\",flexShrink:0},children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 9L12 15L18 9\",stroke:caretColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"18px\",color:questionColor,fontFamily:\"'Maison Neue Book', sans-serif\"},children:question})]}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gridTemplateRows:isOpen?\"1fr\":\"0fr\",transition:\"grid-template-rows 0.4s ease\"},children:/*#__PURE__*/_jsx(\"div\",{ref:contentRef,style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"16px\",marginLeft:\"24px\",marginBottom:\"24px\",fontSize:\"16px\",color:answerColor,lineHeight:\"1.5\",fontFamily:\"'Maison Neue Light', sans-serif\",whiteSpace:\"pre-wrap\",opacity:isOpen?1:0,transition:\"opacity 0.3s ease 0.1s\"},children:answer})})})]});}// --- Sidebar controls ---\naddPropertyControls(FAQAccordion,{items:{type:ControlType.Array,title:\"FAQ Items\",propertyControl:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true}}},defaultValue:[{question:\"What is Framer?\",answer:\"Framer is a design and prototyping tool for teams.\"},{question:\"Can I use it for production?\",answer:\"Yes, Framer sites are production-ready and can be published instantly.\"}]},accordionMode:{type:ControlType.Boolean,title:\"Accordion Mode\",defaultValue:true},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#eeeeee\"},caretColor:{type:ControlType.Color,title:\"Caret Color\",defaultValue:\"#d32f2f\"},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#333333\"},backgroundColor:{type:ControlType.Color,title:\"Question Background Color\",defaultValue:\"#19191962\"},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#666666\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQAccordion\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQTest.map"],"mappings":"+LAAyI,SAAwB,EAAa,CAAC,QAAM,gBAAc,cAAY,aAAW,gBAAc,cAAY,mBAAiB,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAe,IAAI,EAAO,CAAC,EAAW,GAAeA,EAAe,CAAC,CAAC,EAAE,MAAoB,CAAC,EAAc,MAAM,EAAM,MAAM,CAAC,CAAC,KAAK,EAAK,CAAC,CAAE,EAAE,CAAC,EAAM,MAAM,CAAC,EAAE,IAAM,EAAgB,GAAO,CAAC,EAAa,IAAY,EAAM,KAAK,CAAK,CAAE,EAAQ,EAAW,GAAO,CAAC,EAAc,GAAM,CAAC,IAAM,EAAU,CAAC,GAAG,CAAI,EAAqC,MAAnC,GAAU,GAAO,CAAC,EAAU,GAAc,CAAU,CAAC,CAAE,EAAE,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,cAAc,SAAS,IAAI,KAAK,EAAE,SAAS,EAAM,KAAK,EAAK,IAAiB,EAAK,EAAY,CAAC,SAAS,EAAK,SAAS,OAAO,EAAK,OAAO,OAAO,EAAc,IAAY,EAAE,EAAW,GAAG,aAAa,EAAc,EAAgB,CAAC,EAAE,EAAW,CAAC,EAAE,OAAO,GAAG,EAAM,OAAO,EAAc,cAAuB,aAAyB,gBAA0B,cAA4B,iBAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE,CAC3lC,SAAS,EAAY,CAAC,WAAS,SAAO,SAAO,WAAS,SAAO,cAAY,aAAW,gBAAc,cAAY,kBAAgB,eAAe,CAAC,IAAM,EAAWC,EAAa,IAAI,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,aAAa,IAAc,aAAa,OACtR,QAAQ,YAAY,OAAO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