{"version":3,"file":"FAQAccordion_1.DcHZX8o7.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/imi3Cye7VhcBWUyokChg/745KPfsh1k8abi8QMcxM/FAQAccordion_1.js"],"sourcesContent":["// Simple FAQ accordion component with smooth expand/collapse animations\n// Only one item can be open at a time, with customizable styling\n// Now supports CMS collections for FAQ items\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * FAQ Accordion Component\n * \n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function FAQAccordion(props){const{faqItems=[{question:\"What is M3M Mansion?\",answer:\"M3M Mansion is a premium luxury residential project by M3M India, offering spacious apartments with world-class amenities.\",link:\"https://m3mindia.com/residential/m3m-mansion\",linkText:\"Learn More\"},{question:\"What amenities are available?\",answer:\"The project offers swimming pool, gym, clubhouse, landscaped gardens, and 24/7 security.\"}],backgroundColor,textColor,questionFont,answerFont,borderRadius,spacing,dropIcon,customIcon=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\"}=props;const[openIndex,setOpenIndex]=useState(null);const toggleItem=index=>{startTransition(()=>{setOpenIndex(openIndex===index?null:index);});};const getDropdownIcon=()=>{switch(dropIcon){case\"arrow\":return /*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M7 10l5 5 5-5\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});case\"plus\":return /*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M12 5v14m-7-7h14\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});case\"triangle\":return /*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 9l6 6 6-6\",fill:\"currentColor\"})});case\"custom\":return /*#__PURE__*/_jsx(\"img\",{src:customIcon,alt:\"Custom icon\",style:{width:16,height:16,objectFit:\"contain\"}});default:return /*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 9l6 6 6-6\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});}};const isFixedWidth=props?.style&&props.style.width===\"100%\";return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",...isFixedWidth?{...props?.style}:{minWidth:\"max-content\"},minHeight:\"50px\",display:\"flex\",flexDirection:\"column\",gap:spacing},children:faqItems.map((item,index)=>/*#__PURE__*/_jsxs(\"div\",{style:{backgroundColor:backgroundColor,borderRadius:borderRadius,overflow:\"hidden\",border:\"1px solid #EEEEEE\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>toggleItem(index),style:{width:\"100%\",padding:\"16px 20px\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",backgroundColor:\"transparent\",border:\"none\",cursor:\"pointer\",textAlign:\"left\",color:textColor,...questionFont},children:[/*#__PURE__*/_jsx(\"span\",{style:{flex:1,paddingRight:\"12px\"},children:item.question}),/*#__PURE__*/_jsx(motion.div,{animate:{rotate:openIndex===index?dropIcon===\"plus\"?45:180:0},transition:{duration:.2},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0},children:getDropdownIcon()})]}),/*#__PURE__*/_jsx(AnimatePresence,{children:openIndex===index&&/*#__PURE__*/_jsx(motion.div,{initial:{height:0,opacity:0},animate:{height:\"auto\",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:\"easeInOut\"},style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{padding:\"0 20px 20px 20px\",color:textColor,...answerFont},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 12px 0\",lineHeight:\"1.5\"},children:item.answer}),item.link&&/*#__PURE__*/_jsx(\"a\",{href:item.link,target:\"_blank\",rel:\"noopener noreferrer\",style:{display:\"inline-block\",marginTop:\"8px\",padding:\"6px 12px\",backgroundColor:textColor,color:backgroundColor,textDecoration:\"none\",borderRadius:\"4px\",fontSize:\"13px\",fontWeight:\"500\",transition:\"opacity 0.2s ease\"},onMouseEnter:e=>{e.currentTarget.style.opacity=\"0.8\";},onMouseLeave:e=>{e.currentTarget.style.opacity=\"1\";},children:item.linkText||\"Learn More\"})]})})})]},index))});}addPropertyControls(FAQAccordion,{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},link:{type:ControlType.String,title:\"Link (Optional)\",placeholder:\"https://example.com\"},linkText:{type:ControlType.String,title:\"Link Text\",defaultValue:\"Learn More\"}}},defaultValue:[{question:\"What is M3M Mansion?\",answer:\"M3M Mansion is a premium luxury residential project by M3M India, offering spacious apartments with world-class amenities.\",link:\"https://m3mindia.com/residential/m3m-mansion\",linkText:\"Learn More\"},{question:\"What amenities are available?\",answer:\"The project offers swimming pool, gym, clubhouse, landscaped gardens, and 24/7 security.\"}]},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},questionFont:{type:ControlType.Font,title:\"Question Font\",defaultValue:{fontSize:\"18px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},answerFont:{type:ControlType.Font,title:\"Answer Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.4em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},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:16,min:0,max:48,step:1,unit:\"px\"},dropIcon:{type:ControlType.Enum,title:\"Dropdown Icon\",options:[\"chevron\",\"arrow\",\"plus\",\"triangle\",\"custom\"],optionTitles:[\"Chevron\",\"Arrow\",\"Plus\",\"Triangle\",\"Custom\"],defaultValue:\"chevron\",displaySegmentedControl:true},customIcon:{type:ControlType.File,title:\"Custom Icon\",allowedFileTypes:[\"jpg\",\"jpeg\",\"png\",\"gif\",\"webp\",\"svg\"],hidden:({dropIcon})=>dropIcon!==\"custom\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQAccordion\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQAccordion_1.map"],"mappings":"qXAQG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,WAAS,CAAC,CAAC,SAAS,uBAAuB,OAAO,6HAA6H,KAAK,+CAA+C,SAAS,aAAa,CAAC,CAAC,SAAS,gCAAgC,OAAO,2FAA2F,CAAC,CAAC,kBAAgB,YAAU,eAAa,aAAW,eAAa,UAAQ,WAAS,aAAW,sEAAsE,CAAC,EAAW,CAAC,EAAU,EAAa,CAACA,EAAS,MAAY,EAAW,GAAO,CAAC,MAAoB,CAAC,EAAa,IAAY,EAAM,KAAK,EAAQ,EAAG,EAAO,MAAoB,CAAC,OAAO,EAAP,CAAiB,IAAI,QAAQ,OAAoB,EAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,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