{"version":3,"file":"New_form_2.3Aunbdpg.mjs","names":[],"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,CAAC,EAAS,GAAG,CAAM,CAAC,EAAU,EAAa,CAAC,GAAS,EAAM,CAAM,CAAC,EAAM,EAAS,CAAC,EAAS,GAAG,CAAO,EAAS,EAAO,KAAK,CAAO,EAAa,MAAM,GAAG,CAAoB,AAAnB,EAAE,gBAAgB,CAAC,EAAS,GAAG,CAAC,IAAM,EAAA,0GAAyH,EAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,QAAQ,MAAM,CAAO,CAAA,EAAC,QAAQ,CAAC,QAAQ,EAAO,SAAS,KAAK,SAAS,SAAS,KAAM,CAAC,EAAC,GAAG,CAAC,IAAM,EAAI,KAAM,OAAM,EAAS,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,kBAAmB,EAAC,KAAK,KAAK,UAAU,EAAQ,AAAC,EAAC,CAAC,GAAG,EAAI,GAAuB,AAAnB,GAAa,EAAK,CAAC,EAAS,GAAG,KAAM,CAAC,IAAM,EAAK,KAAM,GAAI,MAAM,CAAC,EAAS,EAAK,SAAS,wBAAwB,AAAE,CAAC,MAAK,CAAC,EAAS,uCAAuC,AAAE,CAAC,EAA2G,MAA1G,GAAU,IAAI,CAAC,AAAG,EAAS,SAAS,EAAS,QAAQ,MAAM,YAAY,QAAQ,OAAO,YAAY,AAAG,EAAC,CAAE,EAAC,CAAqB,EAAM,MAAM,CAAC,MAAM,EAAQ,SAAS,CAAC,EAAuB,EAAK,IAAI,CAAC,MAAM,CAAC,GAAG,EAAY,UAAU,YAAa,EAAC,SAAS,4BAA6B,EAAC,CAAc,EAAK,OAAO,CAAC,SAAS,EAAa,MAAM,EAAU,SAAsB,EAAM,MAAM,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