import{a as N,b as re}from"./chunk-4C2L5RA7.js";import{a as v}from"./chunk-TERG3RFO.js";import{d as ne}from"./chunk-UBXHYJCF.js";import{b as Z,c as te}from"./chunk-HA72KDYL.js";import{A as Q,B as W,c as K,g as z,h as w,m as j,p as H,s as B,x as J}from"./chunk-K34LZIA3.js";import{$c as k,Ab as G,Bb as Y,Ca as E,Cb as x,Da as S,Ka as h,Kb as g,Mb as b,Na as f,Va as c,Vf as R,Xf as ee,Yb as D,ba as A,cb as a,db as _,dd as X,eb as p,fb as P,gb as y,ib as F,kb as L,kg as M,la as O,lb as V,ma as U,mb as u,qb as $,rb as C,rc as q,rg as ie,tc as I}from"./chunk-X3RCWQ3R.js";import{i as n}from"./chunk-SR6RTMQI.js";var me=i=>({"input-error":i});function ue(i,t){if(i&1&&(a(0,"div",13),Y(1),_()),i&2){let s=C(2);E(),x(s.formErrors["verify-email-email"]);}}function Ee(i,t){if(i&1){let s=F();a(0,"form",7),$("ngSubmit",function(){O(s);let e=C();return U(e.askSendVerifyEmail());}),a(1,"div",8)(2,"label",9),u(3,2),_(),p(4,"input",10),f(5,ue,2,1,"div",11),_(),p(6,"input",12),_();}if(i&2){let s=C();c("formGroup",s.form),E(4),c("ngClass",b(4,me,s.formErrors["verify-email-email"])),E(),c("ngIf",s.formErrors["verify-email-email"]),E(),c("disabled",!s.form.valid);}}function Se(i,t){i&1&&(a(0,"div"),u(1,3),_());}var _e=(()=>{let t=class t extends te{constructor(e,r,m,l,d){super();n(this,"formReactiveService");n(this,"signupService");n(this,"serverService");n(this,"notifier");n(this,"redirectService");n(this,"requiresEmailVerification",!1);this.formReactiveService=e,this.signupService=r,this.serverService=m,this.notifier=l,this.redirectService=d;}ngOnInit(){this.serverService.getConfig().subscribe(e=>this.requiresEmailVerification=e.signup.requiresEmailVerification),this.buildForm({"verify-email-email":ne});}askSendVerifyEmail(){let e=this.form.value["verify-email-email"];this.signupService.askSendVerifyEmail(e).subscribe({next:()=>{this.notifier.success("Egy ellen\u0151rz\u0151 hivatkoz\xE1st tartalmaz\xF3 e-mail lesz k\xFCldve erre a c\xEDmre: "+e+"."),this.redirectService.redirectToHomepage();},error:r=>this.notifier.error(r.message)});}};n(t,"\u0275fac",function(r){return new(r||t)(S(Z),S(N),S(M),S(R),S(ie));}),n(t,"\u0275cmp",A({type:t,selectors:[["my-verify-account-ask-send-email"]],standalone:!0,features:[h,g],decls:6,vars:2,consts:()=>{let e;e="Meger\u0151s\xEDt\u0151 e-mail k\xE9r\xE9se";let r;r="E-mail-c\xEDm";let m;m="Ellen\u0151rz\u0151 e-mail k\xFCld\xE9se";let l;l="E-mail";let d;return d="Ez a p\xE9ld\xE1ny nem ig\xE9nyel e-mail-ellen\u0151rz\xE9st.",[["emailVerificationNotRequired",""],e,l,d,[1,"margin-content"],[1,"title-page"],[3,"formGroup","ngSubmit",4,"ngIf","ngIfElse"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","verify-email-email"],["type","email","id","verify-email-email","placeholder",r,"required","","formControlName","verify-email-email",1,"form-control",3,"ngClass"],["class","form-error","role","alert",4,"ngIf"],["type","submit","value",m,1,"peertube-button","primary-button",3,"disabled"],["role","alert",1,"form-error"]];},template:function(r,m){if(r&1&&(a(0,"div",4)(1,"h1",5),u(2,1),_(),f(3,Ee,7,6,"form",6)(4,Se,2,0,"ng-template",null,0,D),_()),r&2){let l=G(5);E(3),c("ngIf",m.requiresEmailVerification)("ngIfElse",l);}},dependencies:[I,Q,j,K,z,w,J,W,H,B,q],styles:[`input[type=email][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:340px;max-width:340px;color:var(--input-fg);background-color:var(--input-bg);border:1px solid var(--input-border-color);border-radius:4px;line-height:24px}input[type=email][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder);font-size:14px}input[type=email][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=email][_ngcontent-%COMP%]:focus, input[type=email][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=email][disabled][_ngcontent-%COMP%]{opacity:.4}@media screen and (max-width: 380px){input[type=email][_ngcontent-%COMP%]{width:100%}}
/*# sourceMappingURL=verify-account-ask-send-email.component-PSOS5ABM.css.map */`]}));let i=t;return i;})();function de(i,t){i&1&&(P(0),a(1,"p"),u(2,1),_(),a(3,"p"),u(4,2),_(),y());}function fe(i,t){i&1&&(P(0),a(1,"p"),u(2,3),_(),a(3,"p"),L(4,4),p(5,"a",8),V(),_(),y());}var ae=(()=>{let t=class t{constructor(){n(this,"requiresApproval");}};n(t,"\u0275fac",function(e){return new(e||t)();}),n(t,"\u0275cmp",A({type:t,selectors:[["my-signup-success-after-email"]],inputs:{requiresApproval:"requiresApproval"},standalone:!0,features:[g],decls:6,vars:2,consts:()=>{let o;o="Az e-mail-c\xEDm meger\u0151s\xEDtve!";let e;e="Az e-mail-c\xEDme ellen\u0151rizve lett, \xE9s a fi\xF3kk\xE9r\xE9se el lett k\xFCldve!";let r;r="Hamarosan egy moder\xE1tor ellen\u0151rizni fogja a regisztr\xE1ci\xF3s k\xE9r\xE9s\xE9t, \xE9s levelet fog kapni, ha elfogadt\xE1k vagy elutas\xEDtott\xE1k.";let m;m="Az e-mail-c\xEDme ellen\u0151rizve lett, \xE9s a fi\xF3kja l\xE9trej\xF6tt!";let l;return l="Ha seg\xEDts\xE9gre van sz\xFCks\xE9ge a PeerTube haszn\xE1lat\xE1hoz, akkor megn\xE9zheti a "+"\uFFFD#5\uFFFD"+"dokument\xE1ci\xF3t"+"\uFFFD/#5\uFFFD"+". ",[o,e,r,m,l,["mascotImageName","success"],["type","primary"],[4,"ngIf"],["href","https://docs.joinpeertube.org/use/setup-account","target","_blank","rel","noopener noreferrer",1,"link-primary"]];},template:function(e,r){e&1&&(a(0,"my-signup-step-title",5)(1,"strong"),u(2,0),_()(),a(3,"my-alert",6),f(4,de,5,0,"ng-container",7)(5,fe,6,0,"ng-container",7),_()),e&2&&(E(4),c("ngIf",r.requiresApproval),E(),c("ngIf",!r.requiresApproval));},dependencies:[re,I,v],styles:[`my-alert[_ngcontent-%COMP%]{display:block;font-size:18px;max-width:900px;text-align:center;margin:auto}
/*# sourceMappingURL=signup-success.component-LNJKY4EL.css.map */`]}));let i=t;return i;})();function pe(i,t){if(i&1&&p(0,"my-signup-success-after-email",10),i&2){let s=C(2);c("requiresApproval",s.isRegistrationRequest()&&s.requiresApproval);}}function Ce(i,t){i&1&&(a(0,"my-alert",11),u(1,1),_());}function Ae(i,t){i&1&&(a(0,"my-alert",12)(1,"span"),u(2,2),_(),a(3,"a",13),u(4,3),_()());}function ge(i,t){if(i&1&&(a(0,"div",5)(1,"h1",6),u(2,0),_(),f(3,pe,1,1,"my-signup-success-after-email",7)(4,Ce,2,0,"my-alert",8)(5,Ae,5,0,"my-alert",9),_()),i&2){let s=C();E(3),c("ngIf",s.displaySignupSuccess()),E(),c("ngIf",!s.isRegistrationRequest()&&s.isPendingEmail&&s.success),E(),c("ngIf",s.failed);}}var se=(()=>{let t=class t{constructor(o,e,r,m,l){n(this,"signupService");n(this,"server");n(this,"authService");n(this,"notifier");n(this,"route");n(this,"success",!1);n(this,"failed",!1);n(this,"isPendingEmail",!1);n(this,"requiresApproval");n(this,"loaded",!1);n(this,"userId");n(this,"registrationId");n(this,"verificationString");this.signupService=o,this.server=e,this.authService=r,this.notifier=m,this.route=l;}get instanceName(){return this.server.getHTMLConfig().instance.name;}ngOnInit(){let o=this.route.snapshot.queryParams;if(this.server.getConfig().subscribe(e=>{this.requiresApproval=e.signup.requiresApproval,this.loaded=!0;}),this.userId=o.userId,this.registrationId=o.registrationId,this.verificationString=o.verificationString,this.isPendingEmail=o.isPendingEmail==="true",!this.verificationString){this.notifier.error("Nem tal\xE1lhat\xF3 az ellen\u0151rz\u0151sz\xF6veg a k\xE9r\xE9s webc\xEDm\xE9ben.");return;}if(!this.userId&&!this.registrationId){this.notifier.error("Nem tal\xE1lhat\xF3 felhaszn\xE1l\xF3- vagy regisztr\xE1ci\xF3azonos\xEDt\xF3 a k\xE9r\xE9s webc\xEDm\xE9ben.");return;}this.verifyEmail();}isRegistrationRequest(){return!!this.registrationId;}displaySignupSuccess(){return!(!this.success||!this.isRegistrationRequest()&&this.isPendingEmail);}verifyEmail(){return this.isRegistrationRequest()?this.verifyRegistrationEmail():this.verifyUserEmail();}verifyUserEmail(){let o={userId:this.userId,verificationString:this.verificationString,isPendingEmail:this.isPendingEmail};this.signupService.verifyUserEmail(o).subscribe({next:()=>{this.authService.isLoggedIn()&&this.authService.refreshUserInformation(),this.success=!0;},error:e=>{this.failed=!0,this.notifier.error(e.message);}});}verifyRegistrationEmail(){let o={registrationId:this.registrationId,verificationString:this.verificationString};this.signupService.verifyRegistrationEmail(o).subscribe({next:()=>{this.success=!0;},error:e=>{this.failed=!0,this.notifier.error(e.message);}});}};n(t,"\u0275fac",function(e){return new(e||t)(S(N),S(M),S(ee),S(R),S(k));}),n(t,"\u0275cmp",A({type:t,selectors:[["my-verify-account-email"]],standalone:!0,features:[g],decls:1,vars:1,consts:()=>{let o;o="E-mail-c\xEDm meger\u0151s\xEDt\xE9se";let e;e="E-mail friss\xEDtve.";let r;r="Hiba t\xF6rt\xE9nt.";let m;return m="\xDAj meger\u0151s\xEDt\u0151 e-mail k\xE9r\xE9se",[o,e,r,m,["class","margin-content",4,"ngIf"],[1,"margin-content"],[1,"title-page"],[3,"requiresApproval",4,"ngIf"],["type","success",4,"ngIf"],["type","danger",4,"ngIf"],[3,"requiresApproval"],["type","success"],["type","danger"],["routerLink","/verify-account/ask-send-email",1,"ms-1","link-primary"]];},template:function(e,r){e&1&&f(0,ge,6,3,"div",4),e&2&&c("ngIf",r.loaded);},dependencies:[I,ae,X,v],encapsulation:2}));let i=t;return i;})();var Ke=[{path:"",providers:[N],children:[{path:"email",component:se,data:{meta:{title:"Fi\xF3k ellen\u0151rz\xE9se e-maillel"}}},{path:"ask-send-email",component:_e,data:{meta:{title:"E-mail k\xFCld\xE9s\xE9nek k\xE9r\xE9se a fi\xF3k meger\u0151s\xEDt\xE9s\xE9hez"}}}]}];export{Ke as default};/**i18n:3d16453f213eb5db982e7e7dd90631843ac5d3f860726a614777c3e9e3f9b57e*///# sourceMappingURL=chunk-EBVPIZXU.js.map