(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6945],{90627:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/register/emailVerification",function(){return n(49845)}])},49845:function(e,t,n){"use strict";n.r(t);var i=n(85893),a=n(41664),r=n.n(a),s=n(67294),o=n(11057),l=n(15861),c=n(99226),d=n(98396),u=n(90948),g=n(2734);n(82381),n(58386);var p=n(11431),h=n(81805);n(23020);var m=n(87066),x=n(86501),f=n(11163),b=n(81406),y=n(98456);(0,u.ZP)("img")(e=>{let{theme:t}=e;return{zIndex:2,maxHeight:650,marginTop:t.spacing(12),marginBottom:t.spacing(12),[t.breakpoints.down(1540)]:{maxHeight:550},[t.breakpoints.down("lg")]:{maxHeight:500}}}),(0,u.ZP)(c.Z)(e=>{let{theme:t}=e;return{width:"100%",[t.breakpoints.up("md")]:{maxWidth:450},[t.breakpoints.up("lg")]:{maxWidth:600},[t.breakpoints.up("xl")]:{maxWidth:750}}});let j=(0,u.ZP)(c.Z)(e=>{let{theme:t}=e;return{position:"relative",width:"100%",maxWidth:550,backgroundColor:"white",boxShadow:"0 4px 30px rgba(0, 0, 0, 0.1)",borderRadius:"20px",padding:t.spacing(6),display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:"0.9",zIndex:2}}),Z=(0,u.ZP)(c.Z)(e=>{let{theme:t}=e;return{height:"100vh",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundImage:"url(/images/pages/black-friday-elements-assortment.jpg)",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"fixed",padding:t.spacing(2)}}),k=(0,u.ZP)(c.Z)(e=>{let{theme:t}=e;return{position:"absolute",top:t.spacing(8),left:t.spacing(6)}}),w=(0,u.ZP)(r())(e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",textDecoration:"none",justifyContent:"center",color:t.palette.primary.main,fontSize:t.typography.body1.fontSize,"& img":{borderRadius:"10px"}}}),EmailVerification=()=>{let e=(0,g.Z)(),[t,n]=(0,s.useState)(),[a,r]=(0,s.useState)(""),[u,h]=(0,s.useState)(!1),P=(0,f.useRouter)();(0,d.Z)(e.breakpoints.down("md")),[].push(t);let{email:_}=P.query,handleResendVerification=async()=>{h(!0);try{let e=await m.Z.post("".concat(b.Ao,"/api/organization/resendEmail"),{emailId:_});200===e.status?x.ZP.success("Verification link has been resent to your email",{duration:2e3}):x.ZP.error(e.data.message,{duration:2e3})}catch(e){x.ZP.error(e.response.data.message,{duration:2e3})}h(!1)};return(0,i.jsxs)(Z,{children:[(0,i.jsx)(k,{children:(0,i.jsx)(w,{href:"/",children:(0,i.jsx)("img",{width:"150",alt:"logo",src:"/images/logos/logo-chataak.jpg"})})}),(0,i.jsx)(j,{children:(0,i.jsx)(c.Z,{sx:{p:[6],display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(c.Z,{className:"content",sx:{backgroundColor:"background.paper",height:"20vh",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(c.Z,{sx:{width:"100%",maxWidth:400,textAlign:"center"},children:[(0,i.jsx)(c.Z,{sx:{my:6},children:(0,i.jsx)(l.Z,{sx:{color:"text.secondary",fontSize:"1rem",lineHeight:1.5},children:"An email has been sent to your email address containing a verification link."})}),(0,i.jsxs)(o.Z,{onClick:handleResendVerification,variant:"contained",color:"primary",type:"submit",disabled:u,children:["Resend Verification",u&&(0,i.jsx)(y.Z,{size:14,sx:{marginLeft:2}})]}),(0,i.jsx)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center","& svg":{mr:1},mt:6},children:(0,i.jsxs)(w,{href:"/login",children:[(0,i.jsx)(p.Z,{fontSize:"1.25rem",icon:"tabler:chevron-left"}),(0,i.jsx)("span",{children:"Back to login"})]})})]})})})})})]})};EmailVerification.getLayout=e=>(0,i.jsx)(h.Z,{children:e}),EmailVerification.guestGuard=!0,t.default=EmailVerification}},function(e){e.O(0,[60,9774,2888,179],function(){return e(e.s=90627)}),_N_E=e.O()}]);