import{b}from"./chunk-VKK7FN63.js";import{h as G}from"./chunk-ZNXOWO2Q.js";import{a as W}from"./chunk-AUMGG4VE.js";import{b as I}from"./chunk-7J75J5V7.js";import{C as v,D as $,d as O,g as C,h as M,o as N,r as w,u as D}from"./chunk-VUHOGLVJ.js";import"./chunk-N222QCTS.js";import{Ab as T,Ga as _,Ra as P,Uh as h,Va as c,Zg as y,aa as s,db as S,ka as u,kd as g,mb as a,nb as t,ob as d,od as A,wb as m}from"./chunk-A3ION7ZA.js";import{i as p}from"./chunk-AI7IVZV2.js";var L={VALIDATORS:[O.required],MESSAGES:{required:"\u0397 \u03B5\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7 \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03B1\u03C0\u03B1\u03B9\u03C4\u03B5\u03AF\u03C4\u03B1\u03B9."}};var F=(()=>{let r=class r extends W{formReactiveService=s(I);userService=s(h);notifier=s(y);router=s(A);route=s(g);userId;verificationString;ngOnInit(){this.buildForm({password:G,"password-confirm":L}),this.userId=this.route.snapshot.queryParams.userId,this.verificationString=this.route.snapshot.queryParams.verificationString,(!this.userId||!this.verificationString)&&(this.notifier.error("\u0394\u03B5\u03BD \u03B2\u03C1\u03AD\u03B8\u03B7\u03BA\u03B5 \u03C4\u03BF ID \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7 \u03AE \u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03B5\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7\u03C2."),this.router.navigate(["/"]));}resetPassword(){this.userService.resetPassword(this.userId,this.verificationString,this.form.value.password).subscribe({next:()=>{this.notifier.success("\u039F \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03C3\u03B1\u03C2 \u03AD\u03C7\u03B5\u03B9 \u03B1\u03BD\u03B1\u03BD\u03B5\u03C9\u03B8\u03B5\u03AF \u03BC\u03B5 \u03B5\u03C0\u03B9\u03C4\u03C5\u03C7\u03AF\u03B1!"),this.router.navigate(["/login"]);},error:e=>this.notifier.error(e.message)});}isConfirmedPasswordValid(){let e=this.form.value;return e.password===e["password-confirm"];}};p(r,"\u0275fac",(()=>{let e;return function(o){return(e||(e=u(r)))(o||r);};})()),p(r,"\u0275cmp",P({type:r,selectors:[["ng-component"]],features:[c],decls:13,vars:4,consts:()=>{let e;e="\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7\u03C2";let i;i="\u039F \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03B5\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03B9\u03CE\u03B8\u03B7\u03BA\u03B5";let o;o="\u0395\u03C0\u03B1\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD";let E;E="\u0395\u03C0\u03B1\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD";let R;R="\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7\u03C2";let f;return f="\u0395\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7 \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD",[E,R,f,[1,"margin-content"],[1,"title-page"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","password"],["formControlName","password","inputId","password","placeholder",e,"autocomplete","new-password",3,"formError"],["for","password-confirm"],["formControlName","password-confirm","inputId","password-confirm","placeholder",i,"autocomplete","new-password",3,"formError"],["type","submit","value",o,1,"peertube-button","primary-button",3,"disabled"]];},template:function(i,o){i&1&&(a(0,"div",3)(1,"h1",4),m(2,0),t(),a(3,"form",5),T("ngSubmit",function(){return o.resetPassword();}),a(4,"div",6)(5,"label",7),m(6,1),t(),d(7,"my-input-text",8),t(),a(8,"div",6)(9,"label",9),m(10,2),t(),d(11,"my-input-text",10),t(),d(12,"input",11),t()()),i&2&&(_(3),S("formGroup",o.form),_(4),S("formError",o.formErrors.password),_(4),S("formError",o.formErrors["password-confirm"]),_(),S("disabled",!o.form.valid||!o.isConfirmedPasswordValid()));},dependencies:[v,N,C,M,$,w,D,b],styles:[`my-input-text[_ngcontent-%COMP%]{max-width:340px;display:block}
/*# sourceMappingURL=reset-password.component-6BDFTI2K.css.map */`]}));let l=r;return l;})();var re=[{path:"",component:F,data:{meta:{title:"\u0395\u03C0\u03B1\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2"}}}];export{re as default};/**i18n:1cf7c077143c4c267fdafbe5508f191afcef21bad6aba22a3a8dc180e1003753*///# sourceMappingURL=chunk-VJMBRSR7.js.map