{"version":3,"file":"FAQContainer.BqlFPCVL.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/2LJMOBAAmEvcbft5u90M/EwE5EEXVMMUgdMYvoQPB/FAQContainer.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType,motion,AnimatePresence}from\"framer\";// ─── Default Chevron Icon ─────────────────────────────────────────────────────\nfunction ChevronIcon({isOpen,color,size,duration}){return /*#__PURE__*/_jsx(motion.svg,{width:size,height:size,viewBox:\"0 0 24 24\",fill:\"none\",stroke:color,strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\",animate:{rotate:isOpen?180:0},transition:{duration,ease:[.4,0,.2,1]},style:{flexShrink:0},children:/*#__PURE__*/_jsx(\"polyline\",{points:\"6 9 12 15 18 9\"})});}// ─── Single Accordion Item ────────────────────────────────────────────────────\nfunction AccordionItem({question,answer,isOpen,onToggle,itemBackground,itemBorder,itemBorderRadius,itemPadding,itemShadow,itemBackgroundOpen,itemBorderOpen,itemShadowOpen,itemBackgroundHover,questionFont,questionColor,questionColorOpen,answerFont,answerColor,answerPadding,iconColor,iconColorOpen,iconSize,customIcon,animationDuration}){const[isHovered,setIsHovered]=useState(false);const resolvedBackground=isOpen?itemBackgroundOpen:isHovered?itemBackgroundHover:itemBackground;const resolvedBorder=isOpen?itemBorderOpen:itemBorder;const resolvedShadow=isOpen?itemShadowOpen:itemShadow;const resolvedIconColor=isOpen?iconColorOpen:iconColor;const resolvedQuestionColor=isOpen?questionColorOpen:questionColor;return /*#__PURE__*/_jsxs(motion.div,{onHoverStart:()=>setIsHovered(true),onHoverEnd:()=>setIsHovered(false),onClick:onToggle,style:{background:resolvedBackground,borderRadius:itemBorderRadius,...resolvedBorder,boxShadow:resolvedShadow,overflow:\"hidden\",cursor:\"pointer\",transition:`background ${animationDuration}s ease, box-shadow ${animationDuration}s ease`},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:12,padding:itemPadding},children:[/*#__PURE__*/_jsx(\"span\",{style:{...questionFont,color:resolvedQuestionColor,flex:1},children:question}),customIcon?.src?/*#__PURE__*/_jsx(motion.img,{src:customIcon.src,srcSet:customIcon.srcSet,alt:customIcon.alt??\"toggle\",width:iconSize,height:iconSize,animate:{rotate:isOpen?180:0},transition:{duration:animationDuration,ease:[.4,0,.2,1]},style:{flexShrink:0,objectFit:\"contain\"}}):/*#__PURE__*/_jsx(ChevronIcon,{isOpen:isOpen,color:resolvedIconColor,size:iconSize,duration:animationDuration})]}),/*#__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:{height:{duration:animationDuration,ease:[.4,0,.2,1]},opacity:{duration:animationDuration*.7}},style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{padding:answerPadding,...answerFont,color:answerColor},children:answer})},\"answer\")})]});}// ─── FAQ Container ────────────────────────────────────────────────────────────\n/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function FAQContainer({items=[],defaultOpenIndex=0,containerBackground=\"transparent\",containerBorderRadius=\"0px\",containerPadding=\"0px\",containerShadow=\"none\",itemGap=8,itemBackground=\"#1a1a1a\",itemBorder={borderWidth:1,borderStyle:\"solid\",borderColor:\"#2a2a2a\"},itemBorderRadius=\"12px\",itemPadding=\"20px\",itemShadow=\"none\",itemBackgroundOpen=\"#222222\",itemBorderOpen={borderWidth:1,borderStyle:\"solid\",borderColor:\"#3a3a3a\"},itemShadowOpen=\"none\",itemBackgroundHover=\"#1e1e1e\",questionFont={fontSize:16,fontWeight:500,lineHeight:1.4},questionColor=\"#ffffff\",questionColorOpen=\"#ffffff\",answerFont={fontSize:15,fontWeight:\"400\",lineHeight:1.6},answerColor=\"#888888\",answerPadding=\"0px 20px 20px 20px\",iconColor=\"#888888\",iconColorOpen=\"#ffffff\",iconSize=18,customIcon=null,animationDuration=.3}){const[openIndex,setOpenIndex]=useState(defaultOpenIndex);const handleToggle=index=>{setOpenIndex(prev=>prev===index?-1:index);};if(!items||items.length===0){return /*#__PURE__*/_jsx(\"div\",{style:{padding:24,color:\"#666\",fontSize:14,textAlign:\"center\",border:\"1px dashed #333\",borderRadius:containerBorderRadius},children:\"Add FAQ items in the properties panel\"});}return /*#__PURE__*/_jsx(\"div\",{style:{background:containerBackground,borderRadius:containerBorderRadius,padding:containerPadding,boxShadow:containerShadow,display:\"flex\",flexDirection:\"column\",gap:itemGap,width:\"100%\",boxSizing:\"border-box\"},children:items.map((item,index)=>/*#__PURE__*/_jsx(AccordionItem,{question:item.question,answer:item.answer,isOpen:openIndex===index,onToggle:()=>handleToggle(index),itemBackground:itemBackground,itemBorder:itemBorder,itemBorderRadius:itemBorderRadius,itemPadding:itemPadding,itemShadow:itemShadow,itemBackgroundOpen:itemBackgroundOpen,itemBorderOpen:itemBorderOpen,itemShadowOpen:itemShadowOpen,itemBackgroundHover:itemBackgroundHover,questionFont:questionFont,questionColor:questionColor,questionColorOpen:questionColorOpen,answerFont:answerFont,answerColor:answerColor,answerPadding:answerPadding,iconColor:iconColor,iconColorOpen:iconColorOpen,iconSize:iconSize,customIcon:customIcon,animationDuration:animationDuration},index))});}// ─── Property Controls ────────────────────────────────────────────────────────\naddPropertyControls(FAQContainer,{// ── Content\nitems:{type:ControlType.Array,title:\"FAQ Items\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"What is your question?\",displayTextArea:false},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"Your answer goes here.\",displayTextArea:true}}},defaultValue:[{question:\"What makes your templates different?\",answer:\"Our templates are built with clean component architecture, full customisation controls, and ship with detailed documentation.\"},{question:\"Do I need to know how to code?\",answer:\"Not at all. Everything is configurable directly inside Framer's property panel without touching a single line of code.\"},{question:\"Can I use these on client projects?\",answer:\"Yes. All templates and components come with a commercial licence, so you can use them on unlimited client projects.\"},{question:\"What's included with my purchase?\",answer:\"You get the full Framer source file, lifetime updates, and access to our documentation hub.\"}]},defaultOpenIndex:{type:ControlType.Number,title:\"Default Open\",defaultValue:0,min:-1,max:20,step:1,description:\"Item index open on load. -1 = all closed.\"},// ── Container\ncontainerBackground:{type:ControlType.Color,title:\"Background\",defaultValue:\"transparent\"},containerBorderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"0px\"},containerPadding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"0px\"},containerShadow:{type:ControlType.BoxShadow,title:\"Shadow\",defaultValue:\"none\"},itemGap:{type:ControlType.Number,title:\"Item Gap\",defaultValue:8,min:0,max:48,unit:\"px\"},// ── Item: Default State\nitemBackground:{type:ControlType.Color,title:\"Item BG\",defaultValue:\"#1a1a1a\"},itemBorder:{type:ControlType.Border,title:\"Item Border\",defaultValue:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#2a2a2a\"}},itemBorderRadius:{type:ControlType.BorderRadius,title:\"Item Radius\",defaultValue:\"12px\"},itemPadding:{type:ControlType.Padding,title:\"Item Padding\",defaultValue:\"20px\"},itemShadow:{type:ControlType.BoxShadow,title:\"Item Shadow\",defaultValue:\"none\"},// ── Item: Open State\nitemBackgroundOpen:{type:ControlType.Color,title:\"BG — Open\",defaultValue:\"#222222\"},itemBorderOpen:{type:ControlType.Border,title:\"Border — Open\",defaultValue:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#3a3a3a\"}},itemShadowOpen:{type:ControlType.BoxShadow,title:\"Shadow — Open\",defaultValue:\"none\"},// ── Item: Hover State\nitemBackgroundHover:{type:ControlType.Color,title:\"BG — Hover\",defaultValue:\"#1e1e1e\"},// ── Question Typography\nquestionFont:{type:ControlType.Font,title:\"Question Font\",defaultValue:{fontSize:16,fontWeight:\"500\",lineHeight:1.4},controls:\"extended\",displayFontSize:true,displayTextAlignment:false},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#ffffff\"},questionColorOpen:{type:ControlType.Color,title:\"Question — Open\",defaultValue:\"#ffffff\"},// ── Answer Typography\nanswerFont:{type:ControlType.Font,title:\"Answer Font\",defaultValue:{fontSize:15,fontWeight:\"400\",lineHeight:1.6},controls:\"extended\",displayFontSize:true,displayTextAlignment:false},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#888888\"},answerPadding:{type:ControlType.Padding,title:\"Answer Padding\",defaultValue:\"0px 20px 20px 20px\"},// ── Icon\niconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#888888\"},iconColorOpen:{type:ControlType.Color,title:\"Icon — Open\",defaultValue:\"#ffffff\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:18,min:12,max:48,unit:\"px\"},customIcon:{type:ControlType.ResponsiveImage,title:\"Custom Icon\"},// ── Animation\nanimationDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:.3,min:.05,max:1.5,step:.05,unit:\"s\",description:\"Open/close animation speed in seconds.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQContainer\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQContainer.map"],"mappings":"kOACA,SAAS,EAAY,CAAC,SAAO,QAAM,OAAK,YAAU,CAAC,OAAoB,EAAK,EAAO,IAAI,CAAC,MAAM,EAAK,OAAO,EAAK,QAAQ,YAAY,KAAK,OAAO,OAAO,EAAM,YAAY,EAAE,cAAc,QAAQ,eAAe,QAAQ,QAAQ,CAAC,OAAO,EAAO,IAAI,CAAC,EAAE,WAAW,CAAC,WAAS,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,SAAsB,EAAK,WAAW,CAAC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