{"version":3,"file":"FAQAccordion.C80sIs72.mjs","names":["useState","useMemo"],"sources":["https:/framerusercontent.com/modules/diDhV7BPTEExFjUZ3Qg1/0LsYpW2e2A8aLgSMsz9j/FAQAccordion.js"],"sourcesContent":["// FAQ accordion component for blog CMS with expandable sections\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * FAQ Accordion\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 400\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function FAQAccordion(props){const{q1,a1,q2,a2,q3,a3,q4,a4,q5,a5,q6,a6,q7,a7,q8,a8,q9,a9,q10,a10,allowMultiple,backgroundColor,questionColor,answerColor,borderColor,questionFont,answerFont,borderRadius,spacing,iconColor,transition,style}=props;const[openIndexes,setOpenIndexes]=useState([0]);// Build items array from individual Q&A props\nconst items=useMemo(()=>{const qaProps=[[q1,a1],[q2,a2],[q3,a3],[q4,a4],[q5,a5],[q6,a6],[q7,a7],[q8,a8],[q9,a9],[q10,a10]];return qaProps.filter(([q])=>q?.trim()).map(([question,answer])=>({question,answer}));},[q1,a1,q2,a2,q3,a3,q4,a4,q5,a5,q6,a6,q7,a7,q8,a8,q9,a9,q10,a10]);// Build FAQ schema for SEO\nconst faqSchema=useMemo(()=>{if(items.length===0)return null;return{\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:items.map(item=>({\"@type\":\"Question\",name:item.question,acceptedAnswer:{\"@type\":\"Answer\",text:item.answer}}))};},[items]);const toggleItem=index=>{startTransition(()=>{if(allowMultiple){setOpenIndexes(prev=>prev.includes(index)?prev.filter(i=>i!==index):[...prev,index]);}else{setOpenIndexes(prev=>prev.includes(index)?[]:[index]);}});};const isFixedWidth=style?.width===\"100%\";return /*#__PURE__*/_jsxs(\"div\",{style:{...style,display:\"flex\",flexDirection:\"column\",gap:spacing,width:\"100%\",...isFixedWidth?{}:{minWidth:\"max-content\"}},children:[faqSchema&&/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:JSON.stringify(faqSchema)}}),items.map((item,index)=>{const isOpen=openIndexes.includes(index);return /*#__PURE__*/_jsxs(\"div\",{style:{backgroundColor,border:`1px solid ${borderColor}`,borderRadius,overflow:\"hidden\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>toggleItem(index),style:{width:\"100%\",padding:\"13px\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",gap:16,backgroundColor:\"transparent\",border:\"none\",cursor:\"pointer\",textAlign:\"left\",WebkitTapHighlightColor:\"transparent\"},\"aria-expanded\":isOpen,children:[/*#__PURE__*/_jsx(\"h4\",{style:{color:questionColor,flex:1,margin:0,...questionFont},children:item.question}),/*#__PURE__*/_jsx(motion.svg,{width:\"20\",height:\"20\",viewBox:\"0 0 20 20\",fill:\"none\",animate:{rotate:isOpen?180:0},transition:transition,style:{flexShrink:0},children:/*#__PURE__*/_jsx(\"path\",{d:\"M5 7.5L10 12.5L15 7.5\",stroke:iconColor,strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})]}),/*#__PURE__*/_jsx(motion.div,{initial:false,animate:{height:isOpen?\"auto\":0,opacity:isOpen?1:0},transition:transition,style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"p\",{style:{padding:\"0 13px 13px 13px\",color:answerColor,margin:0,...answerFont},dangerouslySetInnerHTML:{__html:item.answer}})})]},index);})]});}addPropertyControls(FAQAccordion,{q1:{type:ControlType.String,title:\"Question 1\",defaultValue:\"What is your return policy?\"},a1:{type:ControlType.String,title:\"Answer 1\",defaultValue:\"We offer a 30-day money-back guarantee on all products. If you're not satisfied, contact our support team for a full refund.\",displayTextArea:true},q2:{type:ControlType.String,title:\"Question 2\",defaultValue:\"How long does shipping take?\"},a2:{type:ControlType.String,title:\"Answer 2\",defaultValue:\"Standard shipping takes 5-7 business days. Express shipping is available and takes 2-3 business days.\",displayTextArea:true},q3:{type:ControlType.String,title:\"Question 3\",defaultValue:\"Do you ship internationally?\"},a3:{type:ControlType.String,title:\"Answer 3\",defaultValue:\"Yes, we ship to over 100 countries worldwide. Shipping costs and delivery times vary by location.\",displayTextArea:true},q4:{type:ControlType.String,title:\"Question 4\",defaultValue:\"\"},a4:{type:ControlType.String,title:\"Answer 4\",defaultValue:\"\",displayTextArea:true},q5:{type:ControlType.String,title:\"Question 5\",defaultValue:\"\"},a5:{type:ControlType.String,title:\"Answer 5\",defaultValue:\"\",displayTextArea:true},q6:{type:ControlType.String,title:\"Question 6\",defaultValue:\"\"},a6:{type:ControlType.String,title:\"Answer 6\",defaultValue:\"\",displayTextArea:true},q7:{type:ControlType.String,title:\"Question 7\",defaultValue:\"\"},a7:{type:ControlType.String,title:\"Answer 7\",defaultValue:\"\",displayTextArea:true},q8:{type:ControlType.String,title:\"Question 8\",defaultValue:\"\"},a8:{type:ControlType.String,title:\"Answer 8\",defaultValue:\"\",displayTextArea:true},q9:{type:ControlType.String,title:\"Question 9\",defaultValue:\"\"},a9:{type:ControlType.String,title:\"Answer 9\",defaultValue:\"\",displayTextArea:true},q10:{type:ControlType.String,title:\"Question 10\",defaultValue:\"\"},a10:{type:ControlType.String,title:\"Answer 10\",defaultValue:\"\",displayTextArea:true},transition:{type:ControlType.Transition,title:\"Animation\"},allowMultiple:{type:ControlType.Boolean,title:\"Allow Multiple\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#000000\"},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#000000\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#EEEEEE\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#000000\"},questionFont:{type:ControlType.Font,title:\"Question Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},answerFont:{type:ControlType.Font,title:\"Answer Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:32,step:1,unit:\"px\"},spacing:{type:ControlType.Number,title:\"Item Spacing\",defaultValue:12,min:0,max:32,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQAccordion\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"400\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"600\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQAccordion.map"],"mappings":"gPASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,KAAG,MAAI,MAAI,gBAAc,kBAAgB,gBAAc,cAAY,cAAY,eAAa,aAAW,eAAa,UAAQ,YAAU,aAAW,SAAO,EAAW,CAAC,EAAY,GAAgBA,EAAS,CAAC,EAAE,CAAC,CAC/S,EAAMC,MAA2B,CAAC,CAAC,EAAG,EAAG,CAAC,CAAC,EAAG,EAAG,CAAC,CAAC,EAAG,EAAG,CAAC,CAAC,EAAG,EAAG,CAAC,CAAC,EAAG,EAAG,CAAC,CAAC,EAAG,EAAG,CAAC,CAAC,EAAG,EAAG,CAAC,CAAC,EAAG,EAAG,CAAC,CAAC,EAAG,EAAG,C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