{"version":3,"file":"SlackRequest.UaGLaHT7.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/rJ54hBT5F4r4jUW7Ncgu/TJWBuBVgbdUL0yO0w9Go/SlackRequest.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";/**\n * @framerIntrinsicHeight 200\n * @framerIntrinsicWidth 200\n */export default function SlackRequest(props){const[clientName,setName]=useState(\"\");const[email,setEmail]=useState(\"\");const[companyName,setCompanyName]=useState(\"\");const[messageSent,setMessageSent]=useState(false);const[error,setError]=useState(false);const handleSubmit=async e=>{e.preventDefault();try{const response=await fetch(\"https://hooks.slack.com/services/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\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},mode:\"no-cors\",body:JSON.stringify({text:`${clientName}${!!companyName?\" from \"+companyName:\"\"} has requested demo. Email: ${email}`})});setMessageSent(true);setName(\"\");setEmail(\"\");setCompanyName(\"\");}catch(err){console.error(err);setError(true);}};return /*#__PURE__*/_jsxs(\"div\",{className:\"werk-demo-form\",children:[/*#__PURE__*/_jsx(\"style\",{children:demoStyles}),/*#__PURE__*/_jsx(\"h2\",{children:\"Book a demo call with our CEO Martin\"}),!error&&messageSent&&/*#__PURE__*/_jsx(\"p\",{className:\"werk-demo-success\",role:\"status\",children:\"Thank you for reaching out. We will get in contact with you soon!\"}),error&&!messageSent&&/*#__PURE__*/_jsx(\"p\",{className:\"werk-demo-error\",role:\"alert\",children:\"Something went wrong. Try again later or email info@werk.eu.\"}),!messageSent&&/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,children:[/*#__PURE__*/_jsxs(\"label\",{children:[\"Your name\",/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"name\",autoComplete:\"name\",value:clientName,placeholder:\"Name\",onChange:e=>setName(e.target.value),required:true})]}),/*#__PURE__*/_jsxs(\"label\",{children:[\"Your email\",/*#__PURE__*/_jsx(\"input\",{type:\"email\",name:\"email\",autoComplete:\"email\",value:email,placeholder:\"Email\",onChange:e=>setEmail(e.target.value),required:true})]}),/*#__PURE__*/_jsxs(\"label\",{children:[\"Your company\",\" \",/*#__PURE__*/_jsx(\"span\",{className:\"werk-demo-optional\",children:\"(optional)\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"companyName\",autoComplete:\"organization\",value:companyName,placeholder:\"Company name\",onChange:e=>setCompanyName(e.target.value)})]}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",children:\"Request a demo\"})]})]});}const demoStyles=`\n.werk-demo-form,.werk-demo-form *{box-sizing:border-box}\n.werk-demo-form{width:100%;min-width:0;font-family:Inter,sans-serif;color:#415762}\n.werk-demo-form h2{margin:0 0 32px;font-family:inherit;font-size:40px;font-weight:600;line-height:1.2;letter-spacing:-.02em;color:#16324F}\n.werk-demo-form form{display:flex;flex-direction:column;gap:20px;width:100%;margin:0}\n.werk-demo-form label{display:block;font-size:16px;font-weight:500;line-height:1.5;color:#16324F}\n.werk-demo-optional{color:#415762;font-weight:400}\n.werk-demo-form input{display:block;width:100%;min-width:0;min-height:48px;margin-top:8px;padding:12px 14px;border:1px solid #D5DCE2;border-radius:8px;background:white;font:400 16px/1.5 Inter,sans-serif;color:#16324F;outline:none}\n.werk-demo-form input::placeholder{color:#6B7B86;opacity:1}\n.werk-demo-form input:focus-visible{border-color:#16324F;box-shadow:0 0 0 3px rgba(22,50,79,.12)}\n.werk-demo-form button{position:relative;width:100%;min-height:48px;margin-top:4px;padding:12px 24px;border:1px solid #FFC800;border-radius:8px;background:#FFC800;font:500 16px/1.5 Inter,sans-serif;color:#30313D;cursor:pointer}\n.werk-demo-form button:hover{background:#F2BE00;border-color:#F2BE00}\n.werk-demo-form button:focus-visible{outline:2px solid #16324F;outline-offset:3px}\n.werk-demo-form .werk-demo-success,.werk-demo-form .werk-demo-error{margin:24px 0 0;font:400 16px/1.6 Inter,sans-serif}\n.werk-demo-form .werk-demo-success{color:#0B815A}.werk-demo-form .werk-demo-error{color:#B66B6E}\n@media(max-width:1439px){.werk-demo-form h2{font-size:34px}}\n@media(max-width:809px){.werk-demo-form h2{font-size:30px;margin-bottom:24px}}\n`;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SlackRequest\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"200\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SlackRequest.map"],"mappings":"yHAGG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,EAAW,GAASA,EAAS,EAAE,EAAO,CAAC,EAAM,GAAUA,EAAS,EAAE,EAAO,CAAC,EAAY,GAAgBA,EAAS,EAAE,EAAO,CAAC,EAAY,GAAgBA,EAAS,EAAK,EAAO,CAAC,EAAM,GAAUA,EAAS,EAAK,EAA2d,OAAoB,EAAM,MAAM,CAAC,UAAU,iBAAiB,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,CAAU,CAAC,EAAe,EAAK,KAAK,CAAC,SAAS,sCAAsC,CAAC,EAAE,CAAC,GAAO,GAA0B,EAAK,IAAI,CAAC,UAAU,oBAAoB,KAAK,SAAS,SAAS,mEAAmE,CAAC,EAAE,GAAO,CAAC,GAA0B,EAAK,IAAI,CAAC,UAAU,kBAAkB,KAAK,QAAQ,SAAS,8DAA8D,CAAC,EAAE,CAAC,GAA0B,EAAM,OAAO,CAAC,SAAS,KAAz/B,IAAG,CAAC,EAAE,eAAe,EAAE,GAAG,CAAgB,MAAM,MAAM,oFAAoF,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,kBAAkB,EAAE,KAAK,UAAU,KAAK,KAAK,UAAU,CAAC,KAAK,GAAG,IAAe,EAAY,SAAS,EAAY,GAAG,8BAA8B,GAAO,CAAC,CAAC,CAAC,EAAE,EAAe,EAAI,EAAE,EAAQ,EA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