(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6827],{94652:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/send-password-reset-link",function(){return a(93976)}])},70385:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});var t=a(74848);function l(e){let{message:s,className:a}=e;return(0,t.jsxs)("div",{className:"info green"+(a?" "+a:""),children:[(0,t.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,t.jsx)("span",{children:s})]})}a(96540)},24139:(e,s,a)=>{"use strict";var t=a(24994);s.A=void 0;var l=t(a(44888)),n=a(74848);s.A=(0,l.default)([(0,n.jsx)("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m1 13h-2v-6h2zm0-8h-2V7h2z",opacity:".3"},"0"),(0,n.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"},"1")],"InfoTwoTone")},93976:(e,s,a)=>{"use strict";a.r(s),a.d(s,{SendPassResetContext:()=>u,__N_SSP:()=>h,default:()=>x});var t=a(74848),l=a(96540),n=a(93444),i=a(96411),r=a(620),d=a(23698),c=a(70385),o=a(24139);function m(e){let{message:s}=e;return(0,t.jsxs)("div",{className:"info gray",children:[(0,t.jsx)(o.A,{fontSize:"small",color:"inherit",className:"opacity-50 text-gray-600"}),(0,t.jsx)("span",{className:"font-normal",children:s})]})}var h=!0;let u=l.createContext({});function x(e){var s;let a="Cloudbased SQL data management system | Datasquirel",o="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",h=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:a}),(0,t.jsx)("meta",{name:"description",content:o}),(0,t.jsx)(i.A,{pageTitle:a,pageDescription:o,pagePathname:"/"})]}),[x,p]=l.useState(!1),[f,j]=l.useState(!1);return(0,t.jsx)(n.A,{head:h,user:e.user,children:(0,t.jsx)(u.Provider,{value:{user:e.user},children:(0,t.jsx)("main",{children:(0,t.jsxs)("section",{children:[x&&(0,t.jsx)(r.A,{}),f?(0,t.jsx)(c.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,t.jsx)("div",{className:"paper",children:(0,t.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,t.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,t.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,t.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{p(!0),e.preventDefault();let s=e.target["email-address"].value;(0,d.A)("/api/sendPasswordResetLink?email=".concat(s)).then(e=>{console.log(e),setTimeout(()=>{p(!1)},500),e.success&&j(!0)})},children:[(0,t.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:(null==e?void 0:null===(s=e.user)||void 0===s?void 0:s.logged_in_status)?e.user.email:"",required:!0}),(0,t.jsx)("button",{children:"Send password reset Email"}),(0,t.jsx)(m,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[636,6593,8792],()=>s(94652)),_N_E=e.O()}]);