{"version":3,"file":"FAQ_Section.hFaARD07.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/yF00WjVRl33U7MRm0407/rxAVrbk2Ecy49Cu57eUu/FAQ_Section.js"],"sourcesContent":["\"use client\";import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";import{useState,useEffect}from\"react\";export default function FAQAccordion({items=[{question:\"What is this component?\",answer:\"This is a fully configurable FAQ accordion component for Framer.\"},{question:\"How do I customize it?\",answer:\"Use the property controls on the right side to adjust colors, spacing, typography, and content.\"},{question:\"Can I add more questions?\",answer:\"Yes! Click on the items property and add as many FAQ items as you need.\"}],backgroundColor=\"#ffffff\",padding=32,borderRadius=16,questionColor=\"#000000\",answerColor=\"#666666\",questionSize=18,answerSize=16,iconColor=\"#000000\",dividerColor=\"#e5e5e5\",hoverColor=\"#f5f5f5\",allowMultiple=false,questionWeight=600,answerWeight=400,spacing=16,questionFont=\"Inter, -apple-system, BlinkMacSystemFont, sans-serif\",answerFont=\"Inter, -apple-system, BlinkMacSystemFont, sans-serif\"}){const[openIndexes,setOpenIndexes]=useState([0]);useEffect(()=>{const jsonLd={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:items.map(item=>({\"@type\":\"Question\",name:item.question,acceptedAnswer:{\"@type\":\"Answer\",text:item.answer}}))};const script=document.createElement(\"script\");script.type=\"application/ld+json\";script.text=JSON.stringify(jsonLd);script.id=\"faq-schema\";const existingScript=document.getElementById(\"faq-schema\");if(existingScript){existingScript.remove();}document.head.appendChild(script);return()=>{const scriptToRemove=document.getElementById(\"faq-schema\");if(scriptToRemove){scriptToRemove.remove();}};},[items]);const toggleItem=index=>{if(allowMultiple){setOpenIndexes(prev=>prev.includes(index)?prev.filter(i=>i!==index):[...prev,index]);}else{setOpenIndexes(prev=>prev.includes(index)?[]:[index]);}};return /*#__PURE__*/_jsx(\"div\",{style:{backgroundColor,padding,borderRadius,flex:1,width:\"100%\"},role:\"region\",\"aria-label\":\"Frequently Asked Questions\",children:items.map((item,index)=>{const isOpen=openIndexes.includes(index);const isLast=index===items.length-1;return /*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(motion.div,{onClick:()=>toggleItem(index),style:{cursor:\"pointer\",padding:spacing,borderRadius:8},whileHover:{backgroundColor:hoverColor},initial:{backgroundColor:\"transparent\"},role:\"button\",\"aria-expanded\":isOpen,tabIndex:0,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();toggleItem(index);}},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",gap:16},children:[/*#__PURE__*/_jsx(\"h3\",{style:{color:questionColor,fontSize:questionSize,fontWeight:questionWeight,fontFamily:questionFont,flex:1,margin:0},children:item.question}),/*#__PURE__*/_jsx(motion.div,{animate:{rotate:isOpen?180:0},transition:{duration:.3,ease:\"easeInOut\"},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 9L12 15L18 9\",stroke:iconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]}),/*#__PURE__*/_jsx(AnimatePresence,{initial:false,children:isOpen&&/*#__PURE__*/_jsx(motion.div,{initial:{height:0,opacity:0},animate:{height:\"auto\",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:\"easeInOut\"},style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"p\",{style:{paddingTop:12,color:answerColor,fontSize:answerSize,fontWeight:answerWeight,fontFamily:answerFont,lineHeight:1.6,margin:0,whiteSpace:\"pre-wrap\"},children:item.answer})})})]}),!isLast&&/*#__PURE__*/_jsx(\"div\",{style:{height:1,backgroundColor:dividerColor,marginLeft:spacing,marginRight:spacing}})]},index);})});}addPropertyControls(FAQAccordion,{items:{type:ControlType.Array,title:\"FAQ Items\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"Your question here?\"},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true,defaultValue:\"Your answer here.\"}}},defaultValue:[{question:\"What is this component?\",answer:\"This is a fully configurable FAQ accordion component for Framer.\"},{question:\"How do I customize it?\",answer:\"Use the property controls on the right side to adjust colors, spacing, typography, and content.\"},{question:\"Can I add more questions?\",answer:\"Yes! Click on the items property and add as many FAQ items as you need.\"}]},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#ffffff\"},padding:{type:ControlType.Number,title:\"Padding\",min:0,max:100,step:4,defaultValue:32,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",min:0,max:50,step:2,defaultValue:16,unit:\"px\"},spacing:{type:ControlType.Number,title:\"Item Spacing\",min:0,max:32,step:2,defaultValue:16,unit:\"px\"},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#000000\"},questionSize:{type:ControlType.Number,title:\"Question Size\",min:12,max:32,step:1,defaultValue:18,unit:\"px\"},questionWeight:{type:ControlType.Enum,title:\"Question Weight\",options:[300,400,500,600,700,800],optionTitles:[\"Light\",\"Regular\",\"Medium\",\"Semibold\",\"Bold\",\"ExtraBold\"],defaultValue:600},questionFont:{type:ControlType.String,title:\"Question Font\",defaultValue:\"Inter, -apple-system, BlinkMacSystemFont, sans-serif\",placeholder:\"e.g., Inter, Arial, sans-serif\"},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#666666\"},answerSize:{type:ControlType.Number,title:\"Answer Size\",min:12,max:24,step:1,defaultValue:16,unit:\"px\"},answerWeight:{type:ControlType.Enum,title:\"Answer Weight\",options:[300,400,500,600,700],optionTitles:[\"Light\",\"Regular\",\"Medium\",\"Semibold\",\"Bold\"],defaultValue:400},answerFont:{type:ControlType.String,title:\"Answer Font\",defaultValue:\"Inter, -apple-system, BlinkMacSystemFont, sans-serif\",placeholder:\"e.g., Inter, Arial, sans-serif\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#000000\"},dividerColor:{type:ControlType.Color,title:\"Divider Color\",defaultValue:\"#e5e5e5\"},hoverColor:{type:ControlType.Color,title:\"Hover Color\",defaultValue:\"#f5f5f5\"},allowMultiple:{type:ControlType.Boolean,title:\"Allow Multiple\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQAccordion\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQ_Section.map"],"mappings":"2OAAkN,SAAwB,EAAa,CAAC,QAAM,CAAC,CAAC,SAAS,0BAA0B,OAAO,mEAAmE,CAAC,CAAC,SAAS,yBAAyB,OAAO,kGAAkG,CAAC,CAAC,SAAS,4BAA4B,OAAO,0EAA0E,CAAC,CAAC,kBAAgB,UAAU,UAAQ,GAAG,eAAa,GAAG,gBAAc,UAAU,cAAY,UAAU,eAAa,GAAG,aAAW,GAAG,YAAU,UAAU,eAAa,UAAU,aAAW,UAAU,gBAAc,GAAM,iBAAe,IAAI,eAAa,IAAI,UAAQ,GAAG,eAAa,uDAAuD,aAAW,wDAAwD,CAAC,GAAK,CAAC,EAAY,GAAgBA,EAAS,CAAC,EAAE,CAAC,CAAC,MAAc,CAAC,IAAM,EAAO,CAAC,WAAW,qBAAqB,QAAQ,UAAU,WAAW,EAAM,IAAI,IAAO,CAAC,QAAQ,WAAW,KAAK,EAAK,SAAS,eAAe,CAAC,QAAQ,SAAS,KAAK,EAAK,OAAO,CAAC,EAAE,CAAC,CAAO,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,KAAK,sBAAsB,EAAO,KAAK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