{"version":3,"file":"FAQAccordion.CG04e7-5.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/bhxRfnRQsRWDIpQFOSZP/FgYxhqPvf92bXrxaH5zy/FAQAccordion.js"],"sourcesContent":["// FAQ Accordion component with 27 questions that opens one at a time\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";function parseAnswer(answer){const lines=answer.split(\"\\n\");const elements=[];let currentParagraph=[];let currentList=[];let key=0;const flushParagraph=()=>{if(currentParagraph.length>0){elements.push(/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 12px 0\"},children:currentParagraph.join(\" \")},key++));currentParagraph=[];}};const flushList=()=>{if(currentList.length>0){elements.push(/*#__PURE__*/_jsx(\"ul\",{style:{margin:\"0 0 12px 0\",paddingLeft:\"0\",listStyle:\"none\"},children:currentList.map((item,i)=>/*#__PURE__*/_jsx(\"li\",{style:{marginBottom:\"8px\",display:\"block\"},children:item},i))},key++));currentList=[];}};lines.forEach(line=>{const trimmedLine=line.trim();if(trimmedLine===\"\"){flushParagraph();flushList();}else if(trimmedLine.startsWith(\"✅\")||trimmedLine.startsWith(\"✨\")||trimmedLine.startsWith(\"- \")||trimmedLine.startsWith(\"* \")){flushParagraph();currentList.push(trimmedLine);}else{flushList();currentParagraph.push(trimmedLine);}});flushParagraph();flushList();// Remove margin from last element\nif(elements.length>0){const lastElement=elements[elements.length-1];elements[elements.length-1]={...lastElement,props:{...lastElement.props,style:{...lastElement.props.style,margin:0}}};}return elements;}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function FAQAccordion(props){const{items,backgroundColor,itemBackgroundColor,textColor,iconColor,borderRadius,gap,itemPaddingX,itemPaddingY,questionFont,answerFont,borderColor,borderWidth,style}=props;const[openIndex,setOpenIndex]=useState(null);const toggleItem=index=>{startTransition(()=>{setOpenIndex(openIndex===index?null:index);});};return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",backgroundColor,display:\"grid\",gridTemplateColumns:\"repeat(auto-fit, minmax(min(100%, 400px), 1fr))\",gap:`${gap}px`},children:items.map((item,index)=>/*#__PURE__*/_jsxs(\"div\",{style:{backgroundColor:itemBackgroundColor,borderRadius:`${borderRadius}px`,overflow:\"hidden\",cursor:\"pointer\",borderBottom:index<items.length-1?`${borderWidth}px solid ${borderColor}`:\"none\"},onClick:()=>toggleItem(index),children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",padding:`${itemPaddingY}px ${itemPaddingX}px`,gap:\"16px\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{...questionFont,color:textColor,flex:1},children:item.question}),/*#__PURE__*/_jsx(motion.div,{animate:{rotate:openIndex===index?180:0},transition:{duration:.2},style:{flexShrink:0,width:\"20px\",height:\"20px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 9L12 15L18 9\",stroke:iconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]}),/*#__PURE__*/_jsx(AnimatePresence,{initial:false,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__*/_jsx(\"div\",{style:{padding:`0 ${itemPaddingX}px ${itemPaddingY}px ${itemPaddingX+40}px`,...answerFont,color:textColor},children:parseAnswer(item.answer)})})})]},index))});}addPropertyControls(FAQAccordion,{items:{type:ControlType.Array,title:\"FAQ Items\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"How do I add videos?\"},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"You can add videos by clicking the video icon in the toolbar.\",displayTextArea:true}}},defaultValue:[{question:\"C\\xe2t durează realizarea unui machiaj?\",answer:\"\\xcen funcție de tipul de machiaj ales, durata poate varia \\xeentre 30 și 90 de minute. Machiajul de zi se realizează mai rapid, iar cel pentru evenimente necesită mai multă atenție la detalii.\"},{question:\"Ce tipuri de Make up oferiți?\",answer:\"✅ Machiaj de zi – natural și fresh\\n✅ Machiaj de seară – sofisticat și elegant\\n✅ Machiaj de mireasă – rezistent și perfect pentru cea mai importantă zi\\n✅ Machiaj tematic/foto – creativ, artistic, adaptat pentru ședințe foto\"},{question:\"Machiajul va rezista \\xeentreaga zi/seară?\",answer:\"Da! Folosim produse profesionale de lungă durată și tehnici care asigură un machiaj impecabil pentru ore \\xeendelungate.\"},{question:\"Trebuie să vin cu tenul pregătit pentru machiaj?\",answer:\"Ideal este ca tenul să fie curat și hidratat \\xeenainte de ședință. Dacă ai nevoie de pregătire suplimentară, make-up artistul nostru poate aplica o bază potrivită pielii tale.\"}]},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},itemBackgroundColor:{type:ControlType.Color,title:\"Item Background\",defaultValue:\"#F5F5F5\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#000000\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:32,step:1,unit:\"px\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,min:0,max:48,step:1,unit:\"px\"},itemPaddingX:{type:ControlType.Number,title:\"Item Padding X\",defaultValue:20,min:0,max:48,step:1,unit:\"px\"},itemPaddingY:{type:ControlType.Number,title:\"Item Padding Y\",defaultValue:20,min:0,max:48,step:1,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#EEEEEE\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:1,min:0,max:10,step:1,unit:\"px\"},questionFont:{type:ControlType.Font,title:\"Question Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},answerFont:{type:ControlType.Font,title:\"Answer Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQAccordion\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQAccordion.map"],"mappings":"gPAC2M,SAAS,EAAY,EAAO,CAAC,IAAM,EAAM,EAAO,MAAM;EAAK,CAAO,EAAS,EAAE,CAAK,EAAiB,EAAE,CAAK,EAAY,EAAE,CAAK,EAAI,EAAQ,MAAmB,CAAI,EAAiB,OAAO,IAAG,EAAS,KAAkB,EAAK,IAAI,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,SAAS,EAAiB,KAAK,IAAI,CAAC,CAAC,IAAM,CAAC,CAAC,EAAiB,EAAE,GAAU,MAAc,CAAI,EAAY,OAAO,IAAG,EAAS,KAAkB,EAAK,KAAK,CAAC,MAAM,CAAC,OAAO,aAAa,YAAY,IAAI,UAAU,OAAO,CAAC,SAAS,EAAY,KAAK,EAAK,IAAiB,EAAK,KAAK,CAAC,MAAM,CAAC,aAAa,MAAM,QAAQ,QAAQ,CAAC,SAAS,EAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAM,CAAC,CAAC,EAAY,EAAE,GAC5yB,GADgzB,EAAM,QAAQ,GAAM,CAAC,IAAM,EAAY,EAAK,MAAM,CAAI,IAAc,IA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