import{b as G}from"./chunk-EN3GHNYR.js";import{h as L}from"./chunk-O4NWZCXV.js";import{b as $,c as y}from"./chunk-BNV6WX3E.js";import{A as D,B as I,d as O,g as C,h as M,m as N,p as v,s as w}from"./chunk-7VHQBARM.js";import"./chunk-ZJ7WKAH3.js";import{Da as S,Ea as n,Eg as W,La as c,Lb as T,Wa as d,Wf as h,ad as g,ba as f,db as m,dd as A,eb as t,fb as E,nb as p,rb as P}from"./chunk-QXV2GR6R.js";import{i as r}from"./chunk-JJ4RDTEF.js";var b={VALIDATORS:[O.required],MESSAGES:{required:"o pana e nimi wawa sama."}};var F=(()=>{let s=class s extends y{constructor(e,i,o,_,l){super();r(this,"formReactiveService");r(this,"userService");r(this,"notifier");r(this,"router");r(this,"route");r(this,"userId");r(this,"verificationString");this.formReactiveService=e,this.userService=i,this.notifier=o,this.router=_,this.route=l;}ngOnInit(){this.buildForm({password:L,"password-confirm":b}),this.userId=this.route.snapshot.queryParams.userId,this.verificationString=this.route.snapshot.queryParams.verificationString,(!this.userId||!this.verificationString)&&(this.notifier.error("mi ken ala lukin e nimi sijelo anu nimi wawa."),this.router.navigate(["/"]));}resetPassword(){this.userService.resetPassword(this.userId,this.verificationString,this.form.value.password).subscribe({next:()=>{this.notifier.success("mi weka e nimi wawa sina!"),this.router.navigate(["/login"]);},error:e=>this.notifier.error(e.message)});}isConfirmedPasswordValid(){let e=this.form.value;return e.password===e["password-confirm"];}};r(s,"\u0275fac",function(i){return new(i||s)(n($),n(W),n(h),n(A),n(g));}),r(s,"\u0275cmp",f({type:s,selectors:[["ng-component"]],standalone:!0,features:[c,T],decls:13,vars:4,consts:()=>{let e;e="nimi wawa";let i;i="nimi wawa li pona";let o;o="o sin e nimi wawa mi";let _;_="o sin e nimi wawa mi";let l;l="nimi wawa";let u;return u="o pana sin e nimi wawa",[_,l,u,[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&&(m(0,"div",3)(1,"h1",4),p(2,0),t(),m(3,"form",5),P("ngSubmit",function(){return o.resetPassword();}),m(4,"div",6)(5,"label",7),p(6,1),t(),E(7,"my-input-text",8),t(),m(8,"div",6)(9,"label",9),p(10,2),t(),E(11,"my-input-text",10),t(),E(12,"input",11),t()()),i&2&&(S(3),d("formGroup",o.form),S(4),d("formError",o.formErrors.password),S(4),d("formError",o.formErrors["password-confirm"]),S(),d("disabled",!o.form.valid||!o.isConfirmedPasswordValid()));},dependencies:[D,N,C,M,I,v,w,G],styles:[`my-input-text[_ngcontent-%COMP%]{max-width:340px;display:block}
/*# sourceMappingURL=reset-password.component-6CW2LNIG.css.map */`]}));let R=s;return R;})();var oe=[{path:"",component:F,data:{meta:{title:"o weka e nimi wawa"}}}];export{oe as default};/**i18n:224bcada6943fe8b17ea60808c2d370cec9507c3bd670ebe71692d099a3befa1*///# sourceMappingURL=chunk-HPYCZBEY.js.map