import{r,Z as p,t as m,j as e,N as u}from"./index-B-YXshIJ.js";const h=()=>{const[t,i]=r.useState(""),[s,o]=r.useState(""),l=p("auth"),n=m.auth.verifySession.useQuery().data,d=r.useCallback(async a=>{a.preventDefault();try{(await fetch("/api/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:s})})).status===201&&(window.location.href="/demo/create-organization?auth=true&first-org=true")}catch(c){}},[t,s]);return l?(l&&n&&window.location.replace("/demo?auth=true"),e.jsxs("div",{className:"px-6 pt-5 h-screen flex flex-col items-center justify-center",style:{background:"linear-gradient(180deg, #F6F2F9 50%, #FFFFFF 50%)"},children:[e.jsx("h1",{className:"text-center text-gray-900 text-5xl font-bold pb-3",children:"Start your 15 day free trial"}),e.jsx("p",{className:"opacity-90 text-center text-gray-600 text-xl font-normal pb-10",children:"Lorem ipsum dolor sit amet, consectetur adipisicing elit."}),e.jsxs("div",{className:"flex bg-white p-3 gap-2 rounded-md shadow-md",children:[e.jsxs("div",{className:"bg-purple-900 rounded-md w-[50%] p-6",children:[e.jsx("h4",{className:"text-white text-2xl font-bold pb-2",children:"Features"}),e.jsxs("ul",{className:"list-disc list-outside text-white text-base font-normal p-6",children:[e.jsx("li",{className:"p-3",children:"Feature 1 Lorem ipsum dolor sit amet consectetur adipisicing elit"}),e.jsx("li",{className:"p-3",children:"Feature 2 Lorem ipsum dolor sit amet consectetur adipisicing elit"}),e.jsx("li",{className:"p-3",children:"Feature 3 Lorem ipsum dolor sit amet consectetur adipisicing elit"}),e.jsx("li",{className:"p-3",children:"Feature 4 Lorem ipsum dolor sit amet consectetur adipisicing elit"})]})]}),e.jsxs("div",{className:" w-[50%] p-6",children:[e.jsx("h3",{className:"text-left text-gray-800 text-2xl font-semibold pb-1",children:"Create your account"}),e.jsxs("p",{className:"pb-5",children:[e.jsxs("span",{className:"text-gray-600 text-base font-normal",children:["Already have an account?"," "]}),e.jsx("a",{href:"/demo/login?auth=true",className:"text-purple-900 text-base font-semibold",children:"Login"})]}),e.jsxs("form",{onSubmit:d,children:[e.jsxs("div",{className:"pb-6 flex flex-col align-center justify-between",children:[e.jsx("label",{className:"pr-2 pb-2 text-gray-900 text-base font-semibold",htmlFor:"email",children:"Email"}),e.jsx("input",{className:"border border-gray-300 rounded-md px-3 py-3 placeholder-gray-400",id:"email",type:"email",value:t||"",onChange:a=>i(a.target.value),placeholder:"example@email.com",required:!0})]}),e.jsxs("div",{className:"pb-6 flex flex-col align-center justify-between",children:[e.jsx("label",{className:"pr-2 pb-2 text-gray-900 text-base font-semibold",htmlFor:"password",children:"Password"}),e.jsx("input",{className:"border border-gray-300 rounded-md px-3 py-3 placeholder-gray-400",id:"password",type:"password",value:s||"",onChange:a=>o(a.target.value),placeholder:"********",required:!0})]}),e.jsx("button",{type:"submit",className:u(t===""&&s===""?"bg-slate-300 px-5 py-3 text-stone-700 cursor-not-allowed":"bg-gradient-to-r from-purple-950 to-purple-800 text-white cursor-pointer","px-5 py-3 rounded-md w-full text-base font-semibold"),disabled:t===""&&s==="",children:"Register"})]})]})]})]})):null};export{h as default};
