{"version":3,"file":"FAQ.Dxf8Ez-R.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,8EAA8E,CAAC,CAAC,SAAS,+BAA+B,OAAO,kGAAkG,CAAC,CAAC,SAAS,uCAAuC,OAAO,mGAAmG,CAAC,CAAC,YAAU,eAAa,aAAW,aAAW,gBAAc,cAAY,kBAAgB,cAAY,0BAAwB,eAAa,UAAQ,oBAAkB,oBAAkB,EACxpB,EAAM,EAAS,OAAO,GAAM,EAAK,SAAS,MAAM,GAAG,GAAG,CAAM,CAAC,EAAU,GAAcA,MAAqB,EAAiB,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,IAAM,CAAO,EAAW,GAAO,CAAC,MAAoB,CAAC,EAAa,GAAM,CAAC,IAAM,EAAO,IAAI,IAAI,EAAK,CAA4G,OAAxG,EAAO,IAAI,EAAM,CAAE,EAAO,OAAO,EAAM,EAAW,GAAmB,EAAO,OAAO,CAAE,EAAO,IAAI,EAAM,EAAS,GAAS,EAAG,EAC9W,EAAa,CAAC,WAAW,qBAAqB,QAAQ,UAAU,WAAa,EAAM,IAAI,IAAO,CAAC,QAAQ,WAAW,KAAO,EAAK,SAAS,eAAiB,CAAC,QAAQ,SAAS,KAAO,EAAK,OAAO,CAAC,EAAE,CAAC,CAAO,EAAa,GAAO,OAAO,EAAM,MAAM,QAAQ,OAAO,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,S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