{"version":3,"file":"FAQ.JDkefAl0.mjs","names":["useState"],"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,CAACA,EAAS,EAAE,EAAO,CAAC,EAAY,EAAe,CAACA,EAAS,MAAW,CAAC,EAAQ,EAAW,CAACA,EAAS,IAAW,CAAC,EAAM,EAAS,CAACA,EAAS,IAAY,CAAC,EAAS,EAAY,CAACA,EAAS,IACjO,MAAc,CAAC,MAAM,sHAAU,KAAK,GAAK,EAAI,QAAQ,KAAK,GAAM,CACpM,IAAM,EAAO,EAAK,OAAO,GAAK,EAAI,UAAU,EAAI,QAAQ,IAAI,IAAM,CAAC,SAAS,EAAI,SAAS,OAAO,OAAO,EAAI,OAAO,OAAO,GAAG,EAAQ,GAAQ,EAAW,GAAQ,GAAE,MAAM,GAAK,CAAC,QAAQ,MAAM,iCAAiC,GAAK,EAAS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