{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/Woj1AsCf9IfZKnuE3LOh/UqMra0wvRnswUhPXmuA8/HubspotSubscribe.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{Frame}from\"framer\";export default function HubspotSubscribe(props){const[email,setEmail]=useState(\"\");const[resultMessage,setResultMessage]=useState(\"\");const HUBSPOT_PORTAL_ID=\"46657045\";const HUBSPOT_FORM_GUID=\"731b55ac-487b-4c96-bf9b-475eb1507257\";const handleSubmit=async event=>{event.preventDefault();if(!email){setResultMessage(\"Error: Please enter a valid email.\");return;}const hubspotData={fields:[{name:\"email\",value:email}],context:{pageUri:window.location.href,pageName:document.title}};try{const response=await fetch(`https://api.hsforms.com/submissions/v3/integration/submit/${HUBSPOT_PORTAL_ID}/${HUBSPOT_FORM_GUID}`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(hubspotData)});if(response.ok){setResultMessage(\"Form submitted successfully!\");setEmail(\"\");}else{const errorData=await response.json();setResultMessage(`Error: ${errorData.message||\"Submission failed\"}`);}}catch(error){console.error(\"Fetch error:\",error);setResultMessage(`Error: ${error.message}`);}};return /*#__PURE__*/_jsxs(Frame,{style:{height:\"auto\",padding:\"0px 20px 20px\",backgroundColor:\"#f9f9f9\",borderRadius:\"8px\",marginTop:\"20px\",boxShadow:\"0 2px 6px rgba(0, 0, 0, 0.1)\",width:\"100%\"},children:[/*#__PURE__*/_jsx(\"p\",{style:{textAlign:\"left\",fontSize:\"16px\",fontWeight:\"600\",paddingBottom:\"20px\",paddingTop:\"15px\"},children:\"Subscribe to Newsletter\"}),resultMessage?/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"1rem\",fontSize:\"1rem\",color:resultMessage.startsWith(\"Error\")?\"red\":\"green\"},children:resultMessage}):/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,style:{display:\"flex\",flexDirection:\"column\",gap:\"4px\"},children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"email\",style:{fontWeight:\"500\",fontSize:\"14px\",color:\"#111010\",fontFamily:\"Inter\",textAlign:\"left\"},children:\"Email:\"}),/*#__PURE__*/_jsx(\"input\",{type:\"email\",id:\"email\",name:\"email\",value:email,onChange:e=>setEmail(e.target.value),required:true,style:{padding:\"8px\",fontSize:\"1rem\",borderRadius:\"4px\",border:\"1px solid #7f56d933\"}}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:{padding:\"12px\",background:\"#DE00B2\",borderColor:\"#DE00B2\",border:\"none\",marginTop:\"18px\",color:\"#ffffff\",fontSize:\"14px\",lineHeight:\"12px\",fontFamily:\"inter\",fontWeight:\"700\",borderRadius:\"6px\",cursor:\"pointer\"},children:\"Submit\"})]})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HubspotSubscribe\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HubspotSubscribe.map"],
  "mappings": "yIAA8H,SAARA,EAAkCC,EAAM,CAAC,GAAK,CAACC,EAAMC,CAAQ,EAAEC,EAAS,EAAE,EAAO,CAACC,EAAcC,CAAgB,EAAEF,EAAS,EAAE,EAAQG,EAAkB,WAAiBC,EAAkB,uCAAoyB,OAAoBC,EAAMC,EAAM,CAAC,MAAM,CAAC,OAAO,OAAO,QAAQ,gBAAgB,gBAAgB,UAAU,aAAa,MAAM,UAAU,OAAO,UAAU,+BAA+B,MAAM,MAAM,EAAE,SAAS,CAAcC,EAAK,IAAI,CAAC,MAAM,CAAC,UAAU,OAAO,SAAS,OAAO,WAAW,MAAM,cAAc,OAAO,WAAW,MAAM,EAAE,SAAS,yBAAyB,CAAC,EAAEN,EAA2BM,EAAK,MAAM,CAAC,MAAM,CAAC,UAAU,OAAO,SAAS,OAAO,MAAMN,EAAc,WAAW,OAAO,EAAE,MAAM,OAAO,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AU,SAAS,OAAO,WAAW,OAAO,WAAW,QAAQ,WAAW,MAAM,aAAa,MAAM,OAAO,SAAS,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE",
  "names": ["HubspotSubscribe", "props", "email", "setEmail", "ye", "resultMessage", "setResultMessage", "HUBSPOT_PORTAL_ID", "HUBSPOT_FORM_GUID", "u", "Frame", "p", "event", "hubspotData", "window", "response", "errorData", "error", "e"]
}
