{"version":3,"file":"DynamicFAQList_1.C7YPy3PP.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Bw13biBY2LStWbEzMihO/B0FFLRNJd00jcAkJLUgo/DynamicFAQList_1.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{useRoute,addPropertyControls,ControlType}from\"framer\";export function OtoFAQ(props){const route=useRoute();const cmsData=route?.data;const location=props.overrideLocation?.trim()||cmsData?.Locations||\"your location\";const[openIndex,setOpenIndex]=useState(null);const toggle=index=>{setOpenIndex(openIndex===index?null:index);};const faqs=[{q:props.faq1Question?.replace(/\\{\\{location\\}\\}/g,location),a:props.faq1Answer?.replace(/\\{\\{location\\}\\}/g,location)},{q:props.faq2Question?.replace(/\\{\\{location\\}\\}/g,location),a:props.faq2Answer?.replace(/\\{\\{location\\}\\}/g,location)},{q:props.faq3Question?.replace(/\\{\\{location\\}\\}/g,location),a:props.faq3Answer?.replace(/\\{\\{location\\}\\}/g,location)},{q:props.faq4Question?.replace(/\\{\\{location\\}\\}/g,location),a:props.faq4Answer?.replace(/\\{\\{location\\}\\}/g,location)},{q:props.faq5Question?.replace(/\\{\\{location\\}\\}/g,location),a:props.faq5Answer?.replace(/\\{\\{location\\}\\}/g,location)},{q:props.faq6Question?.replace(/\\{\\{location\\}\\}/g,location),a:props.faq6Answer?.replace(/\\{\\{location\\}\\}/g,location)}].filter(faq=>faq.q&&faq.a);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"12px\",padding:\"25px 50px\",background:\"#f6f6f6\",borderRadius:\"20px\"},children:faqs.map((item,index)=>{const isOpen=openIndex===index;return /*#__PURE__*/_jsxs(\"div\",{onClick:()=>toggle(index),style:{background:\"transparent\",borderBottom:index===faqs.length-1?\"none\":\"1px solid #00000010\",padding:\"30px 0\",cursor:\"pointer\",userSelect:\"none\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"17px\",fontWeight:600,color:\"#222\"},children:item.q}),/*#__PURE__*/_jsx(\"span\",{style:{transition:\"transform 0.4s ease\",transform:isOpen?\"rotate(45deg)\":\"rotate(0deg)\",fontSize:22,lineHeight:1,color:\"#000000\"},children:\"+\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{maxHeight:isOpen?\"1000px\":\"0px\",overflow:\"hidden\",transition:\"max-height 0.4s ease\"},children:/*#__PURE__*/_jsx(\"p\",{style:{marginTop:isOpen?12:0,color:\"#444\",fontSize:\"15px\",lineHeight:1.6,whiteSpace:\"pre-line\",opacity:isOpen?1:0,transition:\"opacity 0.3s ease\"},children:item.a})})]},index);})});}addPropertyControls(OtoFAQ,{overrideLocation:{type:ControlType.String,title:\"Override Location\",placeholder:\"e.g. Dubai to Jeddah\"},faq1Question:{type:ControlType.String,title:\"FAQ 1 - Question\"},faq1Answer:{type:ControlType.String,title:\"FAQ 1 - Answer\",displayTextArea:true},faq2Question:{type:ControlType.String,title:\"FAQ 2 - Question\"},faq2Answer:{type:ControlType.String,title:\"FAQ 2 - Answer\",displayTextArea:true},faq3Question:{type:ControlType.String,title:\"FAQ 3 - Question\"},faq3Answer:{type:ControlType.String,title:\"FAQ 3 - Answer\",displayTextArea:true},faq4Question:{type:ControlType.String,title:\"FAQ 4 - Question\"},faq4Answer:{type:ControlType.String,title:\"FAQ 4 - Answer\",displayTextArea:true},faq5Question:{type:ControlType.String,title:\"FAQ 5 - Question\"},faq5Answer:{type:ControlType.String,title:\"FAQ 5 - Answer\",displayTextArea:true},faq6Question:{type:ControlType.String,title:\"FAQ 6 - Question\"},faq6Answer:{type:ControlType.String,title:\"FAQ 6 - Answer\",displayTextArea:true}});OtoFAQ.displayName=\"OTO Dynamic FAQ\";\nexport const __FramerMetadata__ = {\"exports\":{\"OtoFAQ\":{\"type\":\"reactComponent\",\"name\":\"OtoFAQ\",\"slots\":[],\"ann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