{"version":3,"file":"FAQ.B52M3BoL.mjs","names":[],"sources":["https:/framerusercontent.com/modules/MYGEYXk4tU1XpmAjLwIN/bFsBiKwiXHg7TU0xEhZT/FAQ.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{motion}from\"framer-motion\";export default function FAQ(){const[faqs,setFaqs]=useState([]);const[activeIndex,setActiveIndex]=useState(null);const[loading,setLoading]=useState(true);const[error,setError]=useState(false);const[isMobile,setIsMobile]=useState(false);// ✅ Replace this with your actual Sheet.best URL\nconst sheetUrl=\"https://script.google.com/macros/s/AKfycbzfoYANHCataisOEnZqKWrTIcELgR3cggYDlXQ8PK4rVJ_EpR1zjnKPOne_88YkAOGnsg/exec\";useEffect(()=>{fetch(sheetUrl).then(res=>res.json()).then(data=>{// Ensure Question/Answer keys match your Sheet\nconst parsed=data.filter(row=>row.Question&&row.Answer).map(row=>({question:row.Question.trim(),answer:row.Answer.trim()}));setFaqs(parsed);setLoading(false);}).catch(err=>{console.error(\"Error loading FAQ from Sheets:\",err);setError(true);setLoading(false);});const handleResize=()=>{setIsMobile(window.innerWidth<768);};handleResize()// Run once on mount\n;window.addEventListener(\"resize\",handleResize);return()=>window.removeEventListener(\"resize\",handleResize);},[]);const toggleIndex=index=>{setActiveIndex(prev=>prev===index?null:index);};return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[loading&&/*#__PURE__*/_jsx(\"p\",{style:infoStyle,children:\"Loading FAQs...\"}),error&&/*#__PURE__*/_jsx(\"p\",{style:errorStyle,children:\"Failed to load FAQs.\"}),!loading&&!error&&faqs.map((faq,index)=>/*#__PURE__*/_jsxs(\"div\",{style:faqItemStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:{...questionStyle,color:activeIndex===index?\"#397CE0\":\"#232323\"},onClick:()=>toggleIndex(index),children:faq.question}),/*#__PURE__*/_jsx(motion.div,{initial:{height:0,opacity:0},animate:activeIndex===index?{height:\"auto\",opacity:1}:{height:0,opacity:0},transition:{duration:.3},style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:answerStyle,children:faq.answer})})]},index))]});}// ----------------------------\n// Styles (React object syntax)\n// ----------------------------\nconst containerStyle={width:\"100%\",maxWidth:\"960px\",margin:\"0 auto\",padding:\"0px 20px\",fontFamily:\"Inter, sans-serif\",color:\"#232323\"};const faqItemStyle={marginBottom:\"20px\",paddingBottom:\"16px\",borderBottom:\"1px solid #e0e0e0\",cursor:\"pointer\"};const questionStyle={fontSize:\"18px\",fontWeight:\"600\",marginBottom:\"10px\",transition:\"color 0.3s\",lineHeight:\"1.8\"};const answerStyle={fontSize:\"16px\",lineHeight:\"1.8\",paddingLeft:\"4px\",paddingBottom:\"12px\",color:\"#4A4A4A\"};const infoStyle={textAlign:\"center\",color:\"#888\"};const errorStyle={textAlign:\"center\",color:\"red\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQ\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQ.map"],"mappings":"kSAAiI,SAAwB,GAAK,CAAC,GAAK,CAAC,EAAK,EAAQ,CAAC,EAAS,CAAE,EAAC,CAAM,CAAC,EAAY,EAAe,CAAC,EAAS,KAAK,CAAM,CAAC,EAAQ,EAAW,CAAC,GAAS,EAAK,CAAM,CAAC,EAAM,EAAS,CAAC,GAAS,EAAM,CAAM,CAAC,EAAS,EAAY,CAAC,GAAS,EAAM,CACrW,EAAS,qHAAqH,EAAU,IAAI,CAAC,MAAM,EAAS,CAAC,KAAK,GAAK,EAAI,MAAM,CAAC,CAAC,KAAK,GAAM,CACpM,IAAM,EAAO,EAAK,OAAO,GAAK,EAAI,UAAU,EAAI,OAAO,CAAC,IAAI,IAAM,CAAC,SAAS,EAAI,SAAS,MAAM,CAAC,OAAO,EAAI,OAAO,MAAM,AAAC,GAAE,CAAi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