{"version":3,"file":"FAQSection.DY9JDyc3.mjs","names":["useState","useId","useMemo","useCallback"],"sources":["https:/framerusercontent.com/modules/3Spa0oqObspGRAmHQaU9/YMlVfaKb3kpKh5cFHamT/FAQSection.js"],"sourcesContent":["// User request: Keep all FAQ answers rendered in published HTML for SEO, hide closed answers via CSS/layout only, preserve existing visuals/controls/behavior, and keep synchronized accessible accordion aria semantics.\n// Aesthetic FAQ section with expandable items and smooth animations\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition,useCallback,useId,useMemo}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Aesthetic FAQ Section\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function FAQSection(props){const{faqItems,enableFAQSchema,backgroundColor,cardBackground,questionColor,answerColor,accentColor,iconBackground,iconColor,iconPadding,iconRadius,closedIcon,openIcon,openIconColor,openIconBackground,questionFont,answerFont,borderRadius,spacing,cardShadow,hoverShadow,cardPadding,componentPadding,horizontalPadding}=props;const[expandedItems,setExpandedItems]=useState(new Set);const faqInstanceId=useId();const faqSchemaJson=useMemo(()=>{if(!enableFAQSchema||faqItems.length===0)return null;const schema={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:faqItems.map(item=>({\"@type\":\"Question\",name:item.question,acceptedAnswer:{\"@type\":\"Answer\",text:item.answer}}))};return JSON.stringify(schema).replace(/<\\/script/gi,\"<\\\\/script\");},[enableFAQSchema,faqItems]);const toggleItem=useCallback(index=>{startTransition(()=>{setExpandedItems(prev=>{const newSet=new Set(prev);if(newSet.has(index)){newSet.delete(index);}else{newSet.add(index);}return newSet;});});},[]);return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,backgroundColor,paddingTop:`${componentPadding}px`,paddingBottom:`${componentPadding}px`,paddingLeft:`${horizontalPadding}px`,paddingRight:`${horizontalPadding}px`,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",position:\"relative\"},children:[faqSchemaJson?/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:faqSchemaJson}}):null,/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",maxWidth:\"800px\",display:\"flex\",flexDirection:\"column\",gap:`${spacing}px`},children:faqItems.map((item,index)=>{const isExpanded=expandedItems.has(index);const answerId=`${faqInstanceId}-answer-${index}`;const questionId=`${faqInstanceId}-question-${index}`;return /*#__PURE__*/_jsxs(motion.div,{style:{backgroundColor:cardBackground,borderRadius:`${borderRadius}px`,overflow:\"hidden\",boxShadow:cardShadow,border:`1px solid ${isExpanded?accentColor:\"rgba(0, 0, 0, 0.06)\"}`,cursor:\"pointer\"},whileHover:{boxShadow:hoverShadow,scale:1.01},transition:{duration:.2},onClick:()=>toggleItem(index),children:[/*#__PURE__*/_jsxs(\"button\",{id:questionId,type:\"button\",\"aria-expanded\":isExpanded,\"aria-controls\":answerId,onClick:event=>{event.stopPropagation();toggleItem(index);},style:{width:\"100%\",padding:`${cardPadding}px ${cardPadding+4}px`,display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",gap:\"16px\",border:\"none\",background:\"transparent\",textAlign:\"left\",cursor:\"pointer\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:questionColor,flex:1,...questionFont},children:item.question}),/*#__PURE__*/_jsx(motion.div,{style:{width:`${32+iconPadding*2}px`,height:`${32+iconPadding*2}px`,borderRadius:`${iconRadius}px`,backgroundColor:isExpanded?openIconBackground:iconBackground,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",color:isExpanded?openIconColor:iconColor,fontSize:\"18px\",fontWeight:\"bold\"},transition:{duration:.2},children:isExpanded?openIcon:closedIcon})]}),/*#__PURE__*/_jsx(motion.div,{id:answerId,role:\"region\",\"aria-labelledby\":questionId,initial:false,animate:{height:isExpanded?\"auto\":0,opacity:isExpanded?1:0},transition:{duration:.3,ease:\"easeInOut\"},style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{padding:`0 ${cardPadding+4}px ${cardPadding}px ${cardPadding+4}px`,borderTop:`1px solid rgba(0, 0, 0, 0.06)`,paddingTop:\"20px\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:answerColor,opacity:.9,...answerFont},children:item.answer})})})]},index);})})]});}addPropertyControls(FAQSection,{faqItems:{type:ControlType.Array,title:\"FAQ Items\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"What is your return policy?\"},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"We offer a 30-day return policy for all unused items in their original packaging.\",displayTextArea:true}}},defaultValue:[{question:\"What is your return policy?\",answer:\"We offer a 30-day return policy for all unused items in their original packaging. Simply contact our support team to initiate a return.\"},{question:\"How long does shipping take?\",answer:\"Standard shipping typically takes 3-5 business days. Express shipping options are available for faster delivery.\"},{question:\"Do you offer customer support?\",answer:\"Yes, we provide 24/7 customer support through email, chat, and phone. Our team is always ready to help you.\"},{question:\"Can I track my order?\",answer:\"Absolutely! Once your order ships, you'll receive a tracking number via email to monitor your package's progress.\"}],maxCount:10},enableFAQSchema:{type:ControlType.Boolean,title:\"Enable FAQ schema\",defaultValue:false},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},cardBackground:{type:ControlType.Color,title:\"Card Background\",defaultValue:\"#FFFFFF\"},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#000000\"},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#000000\"},accentColor:{type:ControlType.Color,title:\"Accent Color\",defaultValue:\"#000000\"},iconBackground:{type:ControlType.Color,title:\"Icon Background\",defaultValue:\"#F5F5F5\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#000000\"},iconPadding:{type:ControlType.Number,title:\"Icon Padding\",defaultValue:0,min:0,max:16,unit:\"px\"},iconRadius:{type:ControlType.Number,title:\"Icon Radius\",defaultValue:16,min:0,max:32,unit:\"px\"},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\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:12,min:0,max:32,unit:\"px\"},spacing:{type:ControlType.Number,title:\"Item Spacing\",defaultValue:16,min:8,max:32,unit:\"px\"},cardShadow:{type:ControlType.BoxShadow,title:\"Card Shadow\",defaultValue:\"0 2px 8px rgba(0, 0, 0, 0.08)\"},hoverShadow:{type:ControlType.BoxShadow,title:\"Hover Shadow\",defaultValue:\"0 8px 24px rgba(0, 0, 0, 0.12)\"},closedIcon:{type:ControlType.Enum,title:\"Closed Icon\",options:[\"+\",\"⌄\",\"→\",\"▼\",\"⊕\",\"◦\"],optionTitles:[\"Plus\",\"Chevron Down\",\"Right Arrow\",\"Down Arrow\",\"Circle Plus\",\"Bullet\"],defaultValue:\"⌄\"},openIcon:{type:ControlType.Enum,title:\"Open Icon\",options:[\"−\",\"⌃\",\"↓\",\"▲\",\"⊖\",\"◉\"],optionTitles:[\"Minus\",\"Chevron Up\",\"Down Arrow\",\"Up Arrow\",\"Circle Minus\",\"Filled Bullet\"],defaultValue:\"⌃\"},openIconColor:{type:ControlType.Color,title:\"Open Icon Color\",defaultValue:\"#22CC66\"},openIconBackground:{type:ControlType.Color,title:\"Open Icon Background\",defaultValue:\"transparent\"},cardPadding:{type:ControlType.Number,title:\"Card Padding\",defaultValue:24,min:0,max:48,unit:\"px\"},componentPadding:{type:ControlType.Number,title:\"Component Padding\",defaultValue:40,min:0,max:80,unit:\"px\"},horizontalPadding:{type:ControlType.Number,title:\"Horizontal Padding\",defaultValue:40,min:0,max:80,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQSection\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQSection.map"],"mappings":"8PAOG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,WAAS,kBAAgB,kBAAgB,iBAAe,gBAAc,cAAY,cAAY,iBAAe,YAAU,cAAY,aAAW,aAAW,WAAS,gBAAc,qBAAmB,eAAa,aAAW,eAAa,UAAQ,aAAW,cAAY,cAAY,mBAAiB,qBAAmB,EAAW,CAAC,EAAc,GAAkBA,EAAS,IAAI,GAAG,EAAQ,EAAcC,EAAM,EAAQ,EAAcC,MAAY,CAAC,GAAG,CAAC,GAAiB,EAAS,SAAS,EAAE,OAAO,KAAK,IAAM,EAAO,CAAC,WAAW,qBAAqB,QAAQ,UAAU,WAAW,EAAS,IAAI,IAAO,CAAC,QAAQ,WAAW,KAAK,EAAK,SAAS,eAAe,CAAC,QAAQ,SAAS,KAAK,EAAK,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,KAAK,UAAU,CAAM,CAAC,CAAC,QAAQ,cAAc,YAAY,CAAE,EAAE,CAAC,EAAgB,CAAQ,CAAC,EAAQ,EAAWC,EAAY,GAAO,CAAC,MAAoB,CAAC,EAAiB,GAAM,CAAC,IAAM,EAAO,IAAI,IAAI,CAAI,EAAsE,OAAjE,EAAO,IAAI,CAAK,EAAG,EAAO,OAAO,CAAK,EAAQ,EAAO,IAAI,CAAK,EAAU,CAAO,CAAC,CAAE,CAAC,CAAE,EAAE,CAAC,CAAC,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,kBAAgB,WAAW,GAAG,EAAiB,IAAI,cAAc,GAAG,EAAiB,IAAI,YAAY,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