{"version":3,"file":"FAQ.DPETqdeL.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/hkDiUgb6vHMklLk8FoXu/3SMm8fg14fDCDZeGITy3/FAQ.js"],"sourcesContent":["// FAQ component with CMS integration and SEO schema markup\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * FAQ Component with CMS integration and SEO schema markup\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function FAQ(props){const{title,faqItems=[{question:\"What is your return policy?\",answer:\"We offer a 30-day return policy for all unused items in original packaging.\"},{question:\"How long does shipping take?\",answer:\"Standard shipping takes 3-5 business days. Express shipping is available for next-day delivery.\"},{question:\"Do you offer international shipping?\",answer:\"Yes, we ship to over 50 countries worldwide. Shipping costs and delivery times vary by location.\"}],titleFont,questionFont,answerFont,titleColor,questionColor,answerColor,backgroundColor,borderColor,expandedBackgroundColor,borderRadius,spacing,allowMultipleOpen,defaultOpenFirst}=props;// Filter out empty questions\nconst items=faqItems.filter(item=>item.question.trim()!==\"\");const[openItems,setOpenItems]=useState(()=>{return defaultOpenFirst?new Set([0]):new Set;});const toggleItem=index=>{startTransition(()=>{setOpenItems(prev=>{const newSet=new Set(prev);if(newSet.has(index)){newSet.delete(index);}else{if(!allowMultipleOpen){newSet.clear();}newSet.add(index);}return newSet;});});};// Generate JSON-LD schema for SEO\nconst schemaMarkup={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":items.map(item=>({\"@type\":\"Question\",\"name\":item.question,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":item.answer}}))};const isFixedWidth=props?.style&&props.style.width===\"100%\";return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",...isFixedWidth?{...props?.style}:{minWidth:\"max-content\"},display:\"flex\",flexDirection:\"column\",gap:spacing},children:[/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:JSON.stringify(schemaMarkup)}}),title&&/*#__PURE__*/_jsx(\"h2\",{style:{margin:0,color:titleColor,...titleFont},children:title}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:spacing},role:\"list\",children:items.map((item,index)=>{const isOpen=openItems.has(index);return /*#__PURE__*/_jsxs(\"div\",{style:{border:`1px solid ${borderColor}`,borderRadius:borderRadius,backgroundColor:isOpen?expandedBackgroundColor:backgroundColor,overflow:\"hidden\",transition:\"background-color 0.2s ease\"},role:\"listitem\",children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>toggleItem(index),style:{width:\"100%\",padding:\"16px 20px\",border:\"none\",background:\"transparent\",textAlign:\"left\",cursor:\"pointer\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",color:questionColor,...questionFont},\"aria-expanded\":isOpen,\"aria-controls\":`faq-answer-${index}`,children:[/*#__PURE__*/_jsx(\"span\",{style:{flex:1,paddingRight:\"16px\"},children:item.question}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"18px\",fontWeight:\"bold\",transform:isOpen?\"rotate(45deg)\":\"rotate(0deg)\",transition:\"transform 0.2s ease\",flexShrink:0},\"aria-hidden\":\"true\",children:\"+\"})]}),/*#__PURE__*/_jsx(\"div\",{id:`faq-answer-${index}`,style:{maxHeight:isOpen?\"1000px\":\"0\",overflow:\"hidden\",transition:\"max-height 0.3s ease, opacity 0.3s ease\",opacity:isOpen?1:0},\"aria-hidden\":!isOpen,children:/*#__PURE__*/_jsx(\"div\",{style:{padding:\"0 20px 20px 20px\",color:answerColor,...answerFont,transform:isOpen?\"translateY(0)\":\"translateY(-10px)\",transition:\"transform 0.3s ease\"},children:item.answer})})]},index);})})]});}addPropertyControls(FAQ,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"Frequently Asked Questions\"},faqItems:{type:ControlType.Array,title:\"FAQ Items\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"What is your question?\"},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"This is the answer to your question.\",displayTextArea:true}}},defaultValue:[{question:\"What is your return policy?\",answer:\"We offer a 30-day return policy for all unused items in original packaging.\"},{question:\"How long does shipping take?\",answer:\"Standard shipping takes 3-5 business days. Express shipping is available for next-day delivery.\"},{question:\"Do you offer international shipping?\",answer:\"Yes, we ship to over 50 countries worldwide. Shipping costs and delivery times vary by location.\"}]},titleFont:{type:ControlType.Font,title:\"Title Font\",defaultValue:{fontSize:\"32px\",variant:\"Semibold\",letterSpacing:\"-0.03em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},questionFont:{type:ControlType.Font,title:\"Question Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},answerFont:{type:ControlType.Font,title:\"Answer Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},titleColor:{type:ControlType.Color,title:\"Title Color\",defaultValue:\"#000000\"},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#000000\"},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#EEEEEE\"},expandedBackgroundColor:{type:ControlType.Color,title:\"Expanded Background\",defaultValue:\"#F5F5F5\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:32,unit:\"px\"},spacing:{type:ControlType.Number,title:\"Item Spacing\",defaultValue:12,min:0,max:32,unit:\"px\"},allowMultipleOpen:{type:ControlType.Boolean,title:\"Multiple Open\",defaultValue:false,enabledTitle:\"Allow\",disabledTitle:\"Single\"},defaultOpenFirst:{type:ControlType.Boolean,title:\"First Item Open\",defaultValue:false,enabledTitle:\"Open\",disabledTitle:\"Closed\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQ\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQ.map"],"mappings":"yLAMG,SAAwB,EAAI,EAAM,CAAC,GAAK,CAAC,QAAM,WAAS,CAAC,CAAC,SAAS,8BAA8B,OAAO,6EAA6E,EAAE,CAAC,SAAS,+BAA+B,OAAO,iGAAiG,EAAE,CAAC,SAAS,uCAAuC,OAAO,kGAAkG,CAAC,EAAE,YAAU,eAAa,aAAW,aAAW,gBAAc,cAAY,kBAAgB,cAAY,0BAAwB,eAAa,UAAQ,oBAAkB,oBAAkB,EACxpB,EAAM,EAAS,OAAO,GAAM,EAAK,SAAS,KAAK,IAAI,EAAE,EAAO,CAAC,EAAU,GAAcA,MAAqB,EAAiB,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,GAAK,EAAQ,EAAW,GAAO,CAAC,MAAoB,CAAC,EAAa,GAAM,CAAC,IAAM,EAAO,IAAI,IAAI,CAAI,EAA6G,OAAxG,EAAO,IAAI,CAAK,EAAG,EAAO,OAAO,CAAK,GAAY,GAAmB,EAAO,MAAM,EAAG,EAAO,IAAI,CAAK,GAAU,CAAO,CAAC,CAAE,CAAC,CAAE,EAC/W,EAAa,CAAC,WAAW,qBAAqB,QAAQ,UAAU,WAAa,EAAM,IAAI,IAAO,CAAC,QAAQ,WAAW,KAAO,EAAK,SAAS,eAAiB,CAAC,QAAQ,SAAS,KAAO,EAAK,MAAM,CAAC,EAAE,CAAC,EAAQ,EAAa,GAAO,OAAO,EAAM,MAAM,QAAQ,OAAO,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GA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