{"version":3,"file":"LeadCaptureQuery.CLUPqGFp.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/mIFsx1SKduyE5CUnCQgs/QEHQC3Hdq9w7c80nfA97/LeadCaptureQuery.js"],"sourcesContent":["import{useState}from\"react\";const ENDPOINT=\"https://you.meetfellow.com/api/leads/\";export function useSubmitLead(){const[loading,setLoading]=useState(false);const[error,setError]=useState(null);async function submitLead({email,source}){setLoading(true);setError(null);try{const response=await fetch(ENDPOINT,{method:\"POST\",headers:{Accept:\"application/json\",\"Content-Type\":\"application/json\"},body:JSON.stringify({email,custom_attributes:{source}})});const json=await response.json();console.log(json);if(!response.ok){const msg=json?.message||\"Failed to submit lead\";setError(msg);console.log(error);return null;}console.log(\"Success!\");return json;}catch(err){console.log(err);setError(err.message);return null;}finally{setLoading(false);}}return{submitLead,loading,error};}\nexport const __FramerMetadata__ = {\"exports\":{\"useSubmitLead\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LeadCaptureQuery.map"],"mappings":"oGAAmF,SAAgB,GAAe,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAM,CAAC,EAAM,GAAUA,EAAS,KAAK,CAAC,eAAe,EAAW,CAAC,QAAM,UAAQ,CAAC,EAAW,GAAK,CAAC,EAAS,KAAK,CAAC,GAAG,CAAC,IAAM,EAAS,MAAM,MAAM,EAAS,CAAC,OAAO,OAAO,QAAQ,CAAC,OAAO,mBAAmB,eAAe,mBAAmB,CAAC,KAAK,KAAK,UAAU,CAAC,QAAM,kBAAkB,CAAC,SAAO,CAAC,CAAC,CAAC,CAAC,CAAO,EAAK,MAAM,EAAS,MAAM,CAA2J,OAA1J,QAAQ,IAAI,EAAK,CAAK,EAAS,IAAmG,QAAQ,IAAI,WAAW,CAAQ,IAA7E,EAAvC,GAAM,SAAS,wBAAqC,CAAC,QAAQ,IAAI,EAAM,CAAQ,YAAiD,EAAI,CAAwC,OAAvC,QAAQ,IAAI,EAAI,CAAC,EAAS,EAAI,QAAQ,CAAQ,YAAa,CAAC,EAAW,GAAM,EAAG,MAAM,CAAC,aAAW,UAAQ,QAAM,oBAA1uB,CAAM,EAAS"}