"use strict";(self.webpackChunksample_angular_app=self.webpackChunksample_angular_app||[]).push([[927],{2927:(E,u,m)=>{m.r(u),m.d(u,{ChangeEmailModule:()=>x});var g=m(6814),o=m(6223),s=m(9778),e=m(5879);function c(n,i){1&n&&(e.TgZ(0,"div"),e._uU(1,"Email is required."),e.qZA())}function d(n,i){1&n&&(e.TgZ(0,"div"),e._uU(1," Please enter a valid email address. "),e.qZA())}function p(n,i){if(1&n&&(e.TgZ(0,"div",17),e.YNc(1,c,2,0,"div",18),e.YNc(2,d,2,0,"div",18),e.qZA()),2&n){const l=e.oxw();let t,a;e.xp6(1),e.Q6J("ngIf",null==(t=l.changeEmailForm.get("email"))||null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",null==(a=l.changeEmailForm.get("email"))||null==a.errors?null:a.errors.email)}}function h(n,i){if(1&n&&(e.TgZ(0,"div",19),e._uU(1),e.qZA()),2&n){const l=e.oxw();e.xp6(1),e.Oqu(l.message)}}function f(n,i){if(1&n&&(e.TgZ(0,"div",20),e._uU(1),e.qZA()),2&n){const l=e.oxw();e.xp6(1),e.Oqu(l.error)}}const v=function(){return["/login"]},C=[{path:"",component:(()=>{var n;class i{constructor(t,a){this.formBuilder=t,this.router=a,this.message=null,this.error=null}ngOnInit(){this.changeEmailForm=this.formBuilder.group({email:["",[o.kI.required,o.kI.email]]})}onSubmit(){this.changeEmailForm.valid?(this.message="A reset link has been sent to your email.",this.error=null,setTimeout(()=>{this.router.navigate(["/login"])},3e3)):(this.error="Please enter a valid email address.",this.message=null)}}return(n=i).\u0275fac=function(t){return new(t||n)(e.Y36(o.qu),e.Y36(s.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-change-email"]],decls:23,vars:7,consts:[[1,"container-fluid","d-flex","justify-content-center","align-items-center","vh-100"],[1,"row","bg-white","rounded","shadow",2,"width","85%","max-width","900px"],[1,"col-md-6","d-none","d-md-flex","justify-content-center","align-items-center","bg-light"],["src","./../../../assets/images/Mobile login-rafiki.png","alt","Illustration",1,"img-fluid"],[1,"col-md-6","col-12","p-5"],[1,"text-center","mb-4"],[3,"formGroup","ngSubmit"],[1,"mb-3"],["for","email",1,"form-label"],[1,"input-group"],["id","email","formControlName","email","type","email","placeholder","Enter your email",1,"form-control"],["class","text-danger small mt-1",4,"ngIf"],["type","submit",1,"btn","btn-primary","w-100",3,"disabled"],["class","text-success text-center mt-3",4,"ngIf"],["class","text-danger text-center mt-3",4,"ngIf"],[1,"text-center","mt-4"],[1,"link-primary",3,"routerLink"],[1,"text-danger","small","mt-1"],[4,"ngIf"],[1,"text-success","text-center","mt-3"],[1,"text-danger","text-center","mt-3"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"img",3),e.qZA(),e.TgZ(4,"div",4)(5,"h2",5),e._uU(6,"Change Email"),e.qZA(),e.TgZ(7,"form",6),e.NdJ("ngSubmit",function(){return a.onSubmit()}),e.TgZ(8,"div",7)(9,"label",8),e._uU(10,"Email:"),e.qZA(),e.TgZ(11,"div",9),e._UZ(12,"input",10),e.qZA(),e.YNc(13,p,3,2,"div",11),e.qZA(),e.TgZ(14,"button",12),e._uU(15," Send Reset Link "),e.qZA(),e.YNc(16,h,2,1,"div",13),e.YNc(17,f,2,1,"div",14),e.TgZ(18,"div",15)(19,"span")(20,"a",16),e._uU(21,"Login here"),e.qZA(),e._uU(22,"."),e.qZA()()()()()()),2&t){let r;e.xp6(7),e.Q6J("formGroup",a.changeEmailForm),e.xp6(6),e.Q6J("ngIf",(null==(r=a.changeEmailForm.get("email"))?null:r.invalid)&&(null==(r=a.changeEmailForm.get("email"))?null:r.touched)),e.xp6(1),e.Q6J("disabled",a.changeEmailForm.invalid),e.xp6(2),e.Q6J("ngIf",a.message),e.xp6(1),e.Q6J("ngIf",a.error),e.xp6(3),e.Q6J("routerLink",e.DdM(6,v))}},dependencies:[g.O5,o._Y,o.Fj,o.JJ,o.JL,o.sg,o.u,s.rH]}),i})()}];let _=(()=>{var n;class i{}return(n=i).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[s.Bz.forChild(C),s.Bz]}),i})(),x=(()=>{var n;class i{}return(n=i).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[g.ez,o.UX,_]}),i})()}}]);