{"version":3,"file":"New_form_2.BwbgBuKH.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/T2mSUyUXD4bDbQA0OJ5H/TN3UGAOpXEbDA171X4HX/New_form_2.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";/**\n * @framerSupportedLayoutWidth full\n * @framerSupportedLayoutHeight auto\n */export default function CustomHubspotForm2(){const[email,setEmail]=useState(\"\");const[submitted,setSubmitted]=useState(false);const[error,setError]=useState(\"\");const inputRef=useRef(null);const handleSubmit=async e=>{e.preventDefault();setError(\"\");const endpoint=`https://api.hsforms.com/submissions/v3/integration/submit/49252561/21d3aa16-1182-49fe-8fe7-e174d83207fa`;const payload={fields:[{name:\"email\",value:email}],context:{pageUri:window.location.href,pageName:document.title}};try{const res=await fetch(endpoint,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(payload)});if(res.ok){setSubmitted(true);setEmail(\"\");}else{const data=await res.json();setError(data.message||\"Something went wrong.\");}}catch{setError(\"Submission failed. Please try again.\");}};useEffect(()=>{if(inputRef.current){inputRef.current.style.setProperty(\"color\",\"#333\",\"important\");}},[]);return /*#__PURE__*/_jsxs(\"div\",{style:wrapper,children:[submitted?/*#__PURE__*/_jsx(\"p\",{style:{...successText,alignSelf:\"flex-start\"},children:\"Thanks for subscribing! 🎉\"}):/*#__PURE__*/_jsx(\"form\",{onSubmit:handleSubmit,style:formStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:inputWrapper,children:[/*#__PURE__*/_jsx(\"input\",{ref:inputRef,className:\"custom-form2-input\",type:\"email\",value:email,onChange:e=>setEmail(e.target.value),placeholder:\"Email address\",required:true,style:inputStyle}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",className:\"subscribe-button\",style:buttonStyle,children:\"Subscribe\"})]})}),error&&/*#__PURE__*/_jsx(\"p\",{style:{...errorText,alignSelf:\"flex-start\"},children:error}),/*#__PURE__*/_jsx(\"style\",{children:`\n    .custom-form2-input::placeholder {\n        color: black !important;\n        font-weight: 400 !important;\n        opacity: 1 !important;\n    }\n\n    .custom-form2-input:-webkit-autofill {\n        box-shadow: 0 0 0 1000px white inset !important;\n        -webkit-text-fill-color: #333 !important;\n        caret-color: #333;\n    }\n\n    .subscribe-button {\n        transition: background-color 0.2s ease, color 0.2s ease;\n    }\n\n    .subscribe-button:hover {\n        background-color: #ffe0e0 !important;\n        color: #a42424 !important;\n    }\n`})]});}// ✅ Outer container\nconst wrapper={display:\"flex\",flexDirection:\"column\",alignItems:\"center\",gap:\"12px\",backgroundColor:\"#ffffff\",width:\"100%\",maxWidth:\"640px\",boxSizing:\"border-box\",border:\"1px solid #FF5C5F\",borderRadius:\"999999px\",padding:\"6px\"};// ✅ Full-width form\nconst formStyle={width:\"100%\"};// ✅ Transparent wrapper – no border now\nconst inputWrapper={display:\"flex\",flexDirection:\"row\",alignItems:\"flex-end\",flexWrap:\"nowrap\",width:\"100%\",background:\"transparent\",border:\"none\",boxSizing:\"border-box\",gap:\"12px\"};// ✅ Input: now styled like text field w/ bottom border\nconst inputStyle={flexGrow:1,flexShrink:1,minWidth:0,border:\"none\",background:\"transparent\",color:\"white\",padding:\"16px 24px\",fontSize:\"20px\",fontWeight:\"500\",outline:\"none\",fontFamily:'var(--font-family-body, \"Haffer TRIAL\", sans-serif)',letterSpacing:\"-0.2px\",whiteSpace:\"nowrap\"};// ✅ Button stays as is\nconst buttonStyle={backgroundColor:\"#FF5C5F\",color:\"white\",border:\"none\",borderRadius:\"9999px\",padding:\"16px 24px\",fontSize:\"20px\",fontWeight:\"600\",cursor:\"pointer\",fontFamily:'var(--font-family-body, \"Haffer TRIAL\", sans-serif)',letterSpacing:\"-0.2px\",whiteSpace:\"nowrap\",flexShrink:0};const successText={color:\"#333\",fontSize:\"20px\"};const errorText={color:\"#ff5a5a\",fontSize:\"14px\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomHubspotForm2\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"full\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./New_form_2.map"],"mappings":"0NAGG,SAAwB,GAAoB,CAAC,GAAK,CAAC,EAAM,EAAS,CAACA,EAAS,IAAS,CAAC,EAAU,EAAa,CAACA,EAAS,IAAY,CAAC,EAAM,EAAS,CAACA,EAAS,IAAU,EAASC,EAAO,MAAY,EAAa,KAAM,IAAG,CAAC,EAAE,iBAAiB,EAAS,IAAI,IAA+H,EAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,QAAQ,MAAM,EAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAO,SAAS,KAAK,SAAS,SAAS,MAAM,CAAC,CAAC,GAAG,CAAC,IAAM,EAAI,MAAM,MAAM,0GAAS,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,CAAC,KAAK,KAAK,UAAU,GAAS,EAAE,GAAG,EAAI,GAAI,EAAa,IAAM,EAAS,QAAS,CAAC,IAAM,EAAK,MAAM,EAAI,OAAO,EAAS,EAAK,SAAS,wBAA0B,CAAC,MAAK,CAAC,EAAS,uCAAyC,CAAC,EAA2G,OAA1G,MAAc,CAAI,EAAS,SAAS,EAAS,QAAQ,MAAM,YAAY,QAAQ,OAAO,YAAe,EAAC,EAAE,EAAsB,EAAM,MAAM,CAAC,MAAM,EAAQ,SAAS,CAAC,EAAuB,EAAK,IAAI,CAAC,MAAM,CAAC,GAAG,EAAY,UAAU,aAAa,CAAC,SAAS,6BAA6B,EAAe,EAAK,OAAO,CAAC,SAAS,EAAa,MAAM,EAAU,SAAsB,EAAM,MAAM,CAAC,MAAM,EAAa,SAAS,CAAc,EAAK,QAAQ,CAAC,IAAI,EAAS,UAAU,qBAAqB,KAAK,QAAQ,MAAM,EAAM,SAAS,GAAG,EAAS,EAAE,OAAO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