{"version":3,"file":"ContactForm.CcbbMn65.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/1byCwWqYrJ9kOuYdDB4l/ipyw8uuFLEfLOHnfgOPr/ContactForm.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";/* ───────────────────────────────────────────────\n   Your standard reCAPTCHA v3 SITE KEY\n   (obtain from https://www.google.com/recaptcha/admin)\n   ─────────────────────────────────────────────── */const RECAPTCHA_SITE_KEY=\"6LdF31orAAAAAIt8AO4TfgUrbiSgRi0DNAdFvpJL\";export default function ContactUsSalesforceForm(){const formRef=useRef(null);const[submitted,setSubmitted]=useState(false);/* Load v3 script once on mount */useEffect(()=>{if(typeof window===\"undefined\")return;const scriptId=\"recaptcha-v3\";if(!document.getElementById(scriptId)){const s=document.createElement(\"script\");s.id=scriptId;s.src=`https://www.google.com/recaptcha/api.js?render=${RECAPTCHA_SITE_KEY}`;s.async=true;s.defer=true;document.body.appendChild(s);}/* Handle ?submitted=true redirect */const params=new URLSearchParams(window.location.search);if(params.get(\"submitted\")===\"true\"){setSubmitted(true);}else{const ret=formRef.current?.querySelector('input[name=\"retURL\"]');if(ret)ret.value=`${window.location.href.split(\"?\")[0]}?submitted=true`;}},[]);/* Intercept submit → get token → then submit */const handleSubmit=async e=>{e.preventDefault();const form=formRef.current;if(!form||typeof window.grecaptcha===\"undefined\"){alert(\"reCAPTCHA failed to load. Please reload and try again.\");return;}try{await new Promise(r=>window.grecaptcha.ready(r));const token=await window.grecaptcha.execute(RECAPTCHA_SITE_KEY,{action:\"submit\"});/* place token into hidden field */const hidden=form.querySelector('input[name=\"g-recaptcha-response\"]');if(hidden)hidden.value=token;form.submit();}catch(err){console.error(err);alert(\"reCAPTCHA verification failed, please retry.\");}};if(submitted){return /*#__PURE__*/_jsx(\"div\",{style:thankYouStyle,children:\"✅ Thank you! Your message has been received. We’ll be in touch soon.\"});}return /*#__PURE__*/_jsxs(\"form\",{ref:formRef,action:\"https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8&orgId=00DKc000000KmQo\",method:\"POST\",style:formStyle,onSubmit:handleSubmit,children:[/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"orgid\",value:\"00DKc000000KmQo\"}),/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"retURL\",value:\"\"}),/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"external\",value:\"1\"}),/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"g-recaptcha-response\",value:\"\"}),/*#__PURE__*/_jsxs(\"div\",{style:rowStyle,children:[/*#__PURE__*/_jsx(FormField,{label:\"I'm reaching out to...*\",children:/*#__PURE__*/_jsxs(\"select\",{name:\"reason\",required:true,defaultValue:\"\",style:inputStyle,children:[/*#__PURE__*/_jsx(\"option\",{value:\"\",children:\"Select a reason\"}),/*#__PURE__*/_jsx(\"option\",{value:\"ask a question\",children:\"Ask a question\"}),/*#__PURE__*/_jsx(\"option\",{value:\"discuss collaboration opportunities\",children:\"Discuss collaboration opportunities\"}),/*#__PURE__*/_jsx(\"option\",{value:\"get tech support\",children:\"Get tech support\"}),/*#__PURE__*/_jsx(\"option\",{value:\"connect on a press opportunity\",children:\"Connect on a press opportunity\"}),/*#__PURE__*/_jsx(\"option\",{value:\"other\",children:\"Other\"})]})}),/*#__PURE__*/_jsx(FormField,{label:\"Full Name*\",children:/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"web_name__c\",placeholder:\"John Doe\",required:true,style:inputStyle})})]}),/*#__PURE__*/_jsx(FormField,{label:\"Mobile Number\",children:/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"web_phone__c\",placeholder:\"Enter your phone number\",style:inputStyle})}),/*#__PURE__*/_jsx(FormField,{label:\"Email Address*\",children:/*#__PURE__*/_jsx(\"input\",{type:\"email\",name:\"web_email__c\",placeholder:\"Enter your email address\",required:true,style:inputStyle})}),/*#__PURE__*/_jsx(FormField,{label:\"Message*\",children:/*#__PURE__*/_jsx(\"textarea\",{name:\"description\",placeholder:\"Type your message\",required:true,rows:4,style:{...inputStyle,resize:\"vertical\"}})}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:buttonStyle,children:\"Send message\"})]});}/* helper component */function FormField({label,children}){return /*#__PURE__*/_jsxs(\"label\",{style:labelStyle,children:[/*#__PURE__*/_jsx(\"span\",{style:labelTextStyle,children:label}),children]});}/* Styles */const formStyle={display:\"flex\",flexDirection:\"column\",gap:\"20px\",backgroundColor:\"#071F26\",padding:\"48px\",borderRadius:\"12px\",fontFamily:\"Inter, sans-serif\",maxWidth:\"800px\",margin:\"0 auto\"};const rowStyle={display:\"flex\",gap:\"20px\",flexWrap:\"wrap\"};const labelStyle={display:\"flex\",flexDirection:\"column\",gap:\"8px\",flex:1,minWidth:\"250px\"};const labelTextStyle={fontSize:\"14px\",fontWeight:500,color:\"#F1F1F1\"};const inputStyle={padding:\"14px\",fontSize:\"16px\",borderRadius:\"8px\",border:\"1px solid #2A2A2A\",backgroundColor:\"#11272F\",color:\"#fff\",fontFamily:\"inherit\",width:\"100%\",boxSizing:\"border-box\"};const buttonStyle={marginTop:\"12px\",padding:\"14px 20px\",fontSize:\"16px\",fontWeight:500,color:\"#FFFFFF\",backgroundColor:\"#0D4B5A\",border:\"none\",borderRadius:\"24px\",fontFamily:\"inherit\",cursor:\"pointer\",alignSelf:\"flex-start\"};const thankYouStyle={backgroundColor:\"#E6F4EA\",border:\"1px solid #A8DAB5\",borderRadius:\"12px\",padding:\"32px\",color:\"#20563A\",fontSize:\"18px\",textAlign:\"center\",maxWidth:\"600px\",margin:\"60px auto\",fontFamily:\"Inter, sans-serif\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ContactUsSalesforceForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ContactFor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