{"version":3,"file":"GetSimulationFlow.DBb9DN75.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/teOJR22N8BLwsd4MnvK6/abh6ngQ7L0htmkYwbinC/GetSimulationFlow.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";// Learn more: https://www.framer.com/docs/guides/overrides/\n/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function SimulationForm(){const[contact,setContact]=useState(\"\");const[contactName,setContactName]=useState(\"\");const[company,setCompany]=useState(\"\");const[hover,setHover]=useState(false);const[requestedSimulation,setRequestedSimulation]=useState(false);const handleMouseEnter=()=>setHover(true);const handleMouseLeave=()=>setHover(false);const formIsValid=contact.length>1&&contactName.length>1&&company.length>1;const handleSubmit=async event=>{event.preventDefault();if(!formIsValid)return;// Trim values so the success screen has clean text\nconst cleanEmail=contact.trim();const cleanName=contactName.replace(/\\s+/g,\" \").trim();const cleanCompany=company.replace(/\\s+/g,\" \").trim();setContact(cleanEmail);setContactName(cleanName);setCompany(cleanCompany);const submittedValues=JSON.stringify({email:cleanEmail,name:cleanName,company:cleanCompany});const saveContactUrl=\"https://app.pluno.ai/api/submit-simulation-form?value=\"+encodeURIComponent(submittedValues);await fetch(saveContactUrl);setRequestedSimulation(true);};// ---------- Shared styles ----------\nconst containerStyle={display:\"flex\",flexDirection:\"column\",gap:16,fontFamily:\"Manrope\",fontSize:18,color:\"white\",padding:24,backgroundColor:\"black\",borderRadius:12,boxShadow:\"rgba(78,69,181,0.4) 0px 0px 14px\",width:\"100%\",maxWidth:560,boxSizing:\"border-box\"};const headlineStyle={margin:0,marginBottom:8,fontSize:28,lineHeight:1.2,fontWeight:700,letterSpacing:-.2};const subStyle={margin:0,marginBottom:8,opacity:.75,fontSize:14};const fieldLabel={fontSize:13,opacity:.8,marginBottom:6};const inputStyle={width:\"100%\",padding:\"14px 16px\",border:\"1px solid rgba(255,255,255,0.14)\",borderRadius:12,background:\"rgba(255,255,255,0.04)\",color:\"white\",outline:\"none\",boxSizing:\"border-box\",transition:\"border-color 120ms ease, box-shadow 120ms ease\"};const inputFocusStyle={borderColor:\"rgba(190, 90, 255, 0.6)\",boxShadow:\"0 0 0 4px rgba(190, 90, 255, 0.15)\"};const[focusKey,setFocusKey]=useState(null);// Derive a friendly first name for the success view\nconst firstName=(contactName.trim().split(/\\s+/)[0]||\"\").trim()||(contact.includes(\"@\")?contact.split(\"@\")[0]:\"\")||\"there\";return!requestedSimulation?/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,style:containerStyle,children:[/*#__PURE__*/_jsx(\"h2\",{style:headlineStyle,children:\"You're about to experience what AI can really do!\"}),/*#__PURE__*/_jsx(\"p\",{style:subStyle,children:\"Fill in your details and we'll get in touch.\"}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"span\",{style:fieldLabel,children:\"Your email*\"}),/*#__PURE__*/_jsx(\"input\",{type:\"email\",name:\"email\",placeholder:\"you@company.com\",value:contact,onChange:e=>setContact(e.target.value),onFocus:()=>setFocusKey(\"email\"),onBlur:()=>setFocusKey(null),required:true,maxLength:120,style:{...inputStyle,...focusKey===\"email\"?inputFocusStyle:{}}})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"span\",{style:fieldLabel,children:\"Your full name*\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"fullName\",placeholder:\"First Last\",value:contactName,onChange:e=>setContactName(e.target.value),onFocus:()=>setFocusKey(\"name\"),onBlur:()=>setFocusKey(null),required:true,style:{...inputStyle,...focusKey===\"name\"?inputFocusStyle:{}}})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"span\",{style:fieldLabel,children:\"Company website*\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"company\",placeholder:\"https://company.com\",value:company,onChange:e=>setCompany(e.target.value),onFocus:()=>setFocusKey(\"company\"),onBlur:()=>setFocusKey(null),required:true,style:{...inputStyle,...focusKey===\"company\"?inputFocusStyle:{}}})]}),/*#__PURE__*/_jsx(\"input\",{type:\"submit\",value:\"Request simulation\",onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,style:{fontSize:\"16px\",fontFamily:\"Manrope\",width:\"100%\",padding:\"16px\",backgroundImage:hover?\"linear-gradient(rgb(93, 80, 195) 0%, rgba(190, 90, 255, 0.7) 0%)\":\"linear-gradient(rgb(93, 80, 195) 0%, rgba(190, 90, 255, 0.7) 100%)\",backgroundColor:\"#000000\",color:\"white\",fontWeight:\"bold\",border:\"none\",borderRadius:\"100px\",cursor:formIsValid?\"pointer\":\"default\"}})]}):// ---------- Improved success view ----------\n/*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"inline-flex\",alignItems:\"center\",gap:8,padding:\"6px 10px\",borderRadius:999,border:\"1px solid rgba(190, 90, 255, 0.45)\",background:\"rgba(190, 90, 255, 0.08)\",fontSize:12,fontWeight:600,letterSpacing:.2,width:\"fit-content\"},children:[/*#__PURE__*/_jsx(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M9 16.2l-3.5-3.5-1.4 1.4L9 19 20.3 7.7l-1.4-1.4z\",fill:\"currentColor\"})}),\"Request received\"]}),/*#__PURE__*/_jsxs(\"h3\",{style:{margin:0,marginTop:4,marginBottom:6,fontWeight:800,fontSize:24,letterSpacing:-.2},children:[\"Thanks, \",firstName,\"!\"]}),/*#__PURE__*/_jsxs(\"p\",{style:{margin:0,opacity:.85},children:[\"We’ll be in contact with you shortly\",contact?` at ${contact}`:\"\",\" 🙂\"]}),/*#__PURE__*/_jsx(\"div\",{style:{height:1,background:\"linear-gradient(90deg, rgba(190,90,255,0.0), rgba(190,90,255,0.35), rgba(190,90,255,0.0))\",marginTop:16,marginBottom:8}}),/*#__PURE__*/_jsxs(\"ul\",{style:{margin:0,paddingLeft:18,opacity:.75,lineHeight:1.5,fontSize:14},children:[/*#__PURE__*/_jsx(\"li\",{children:\"Keep an eye on your inbox for next steps.\"}),/*#__PURE__*/_jsx(\"li\",{children:\"Reply to that email if you want to share goals or timelines.\"})]})]});}export function withHover(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SimulationForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GetSimulationFlow.map"],"mappings":"kKAIG,SAAwB,GAAgB,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,GAAG,CAAM,CAAC,EAAY,GAAgBA,EAAS,GAAG,CAAM,CAAC,EAAQ,GAAYA,EAAS,GAAG,CAAM,CAAC,EAAM,GAAUA,EAAS,GAAM,CAAM,CAAC,EAAoB,GAAwBA,EAAS,GAAM,CAAO,MAAqB,EAAS,GAAK,CAAO,MAAqB,EAAS,GAAM,CAAO,EAAY,EAAQ,OAAO,GAAG,EAAY,OAAO,GAAG,EAAQ,OAAO,EAAQ,EAAa,KAAM,IAAO,CAAwB,GAAvB,EAAM,gBAAgB,CAAI,CAAC,EAAY,OACzf,IAAM,EAAW,EAAQ,MAAM,CAAO,EAAU,EAAY,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAO,EAAa,EAAQ,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAC,EAAW,EAAW,CAAC,EAAe,EAAU,CAAC,EAAW,E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