import{g,P as Pc,r as rr,a as rc,$ as $t,x as xpe,_ as _pe,B as Bn,j,b as Pa,T as Tr,M as Me,J as Jn,q as qn,l as ln,Z as Zh,w as w0,I as I$,p as px,c as IV,F as F2,s as sp,v as vV,d as lb,e as Fp,G as GI,z as zI,f as Pp,h as sx,i as ax,k as w2,O as Ox,S as SV,t as t$,m as zH,W as WB,n as cx,E as EV,o as x2,u as Mx,y as qH}from'./main-DEZ5cZzu.js';var Z=["modal"];function ee(i,N){i&1&&(sp(0,"li"),sx(1,5),Pp(2,"strong"),ax(),lb());}function te(i,N){i&1&&(sp(0,"li"),sx(1,6),Pp(2,"strong"),ax(),lb());}function ne(i,N){if(i&1){let e=F2();sp(0,"div",7)(1,"h4",8),vV(2,1),lb(),sp(3,"button",9),Fp("click",function(){let t=GI(e).close;return zI(t());}),Pp(4,"my-global-icon",10),lb()(),sp(5,"div",11),Pp(6,"img",12),sp(7,"div",13),vV(8,2),lb(),sp(9,"p"),sx(10,3),Pp(11,"strong"),ax(),lb(),sp(12,"ul"),w2(13,ee,3,0,"li"),w2(14,te,3,0,"li"),lb()(),sp(15,"div",14)(16,"my-peertube-checkbox",15),Ox("ngModelChange",function(t){GI(e);let c=SV();return t$(c.stopDisplayModal,t)||(c.stopDisplayModal=t),zI(t);}),lb(),zH(),sp(17,"input",16),Fp("click",function(){let t=GI(e).close;return zI(t());})("key.enter",function(){let t=GI(e).close;return zI(t());}),lb(),sp(18,"a",17),Fp("click",function(){let t=GI(e).close;return zI(t());})("key.enter",function(){let t=GI(e).close;return zI(t());}),vV(19,4),lb()();}if(i&2){let e=SV();WB(2),cx(e.instanceName),EV(2),WB(11),x2(e.hasAccountAvatar(e.user)?-1:13),WB(),x2(e.hasAccountDescription(e.user)?-1:14),WB(2),Mx("ngModel",e.stopDisplayModal),qH();}}var me=(()=>{class i{userService=g(Pc);modalService=g(rr);notifier=g(rc);serverService=g($t);modal=xpe("modal");created=_pe();stopDisplayModal=false;ref;user;LS_KEYS={NO_ACCOUNT_SETUP_WARNING_MODAL:"no_account_setup_warning_modal"};ngOnInit(){this.created.emit();}get instanceName(){return this.serverService.getHTMLConfig().instance.name;}hasAccountAvatar(e){return e.account.avatars.length!==0;}hasAccountDescription(e){return!!e.account.description;}shouldAutoOpen(e){return!(this.modalService.hasOpenModals()||e.noAccountSetupWarningModal===true||Bn.getItem(this.LS_KEYS.NO_ACCOUNT_SETUP_WARNING_MODAL)==="true"||this.hasAccountAvatar(e)&&this.hasAccountDescription(e)||this.userService.hasSignupInThisSession());}show(e){this.user=e,!this.ref&&(this.ref=this.modalService.open(this.modal(),{centered:true,backdrop:"static",keyboard:false,size:"md"}),this.ref.result.finally(()=>{this.stopDisplayModal===true&&this.doNotOpenAgain();}));}doNotOpenAgain(){Bn.setItem(this.LS_KEYS.NO_ACCOUNT_SETUP_WARNING_MODAL,"true"),this.userService.updateMyProfile({noAccountSetupWarningModal:true}).subscribe({next:()=>j.info("We will not open the account setup modal again."),error:e=>this.notifier.handleError(e)});}static ɵfac=function(n){return new(n||i)();};static ɵcmp=Pa({type:i,selectors:[["my-account-setup-warning-modal"]],viewQuery:function(n,t){n&1&&px(t.modal,Z,5),n&2&&IV();},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let e;e="Itxi laster-leiho hau";let n;n="Ez erakutsi hau gehiago";let t;t="Itxi";let c;c="Ongi etorri "+"\uFFFD0\uFFFD"+" instantziara, erabiltzaile hori!";let O;O="Kontuaren profila konfiguratzeko ordua da!";let E;E="Lagundu moderatzaileei eta erabiltzaileei "+"\uFFFD#11\uFFFD"+"nor zaren"+"\uFFFD/#11\uFFFD"+" jakiten:";let f;f="Set up";let F;F=""+"\uFFFD#2\uFFFD"+"Abatar"+"\uFFFD/#2\uFFFD"+" bat igotzen";let P;return P=""+"\uFFFD#2\uFFFD"+"Azalpen"+"\uFFFD/#2\uFFFD"+" bat idazten",[["modal",""],c,O,E,f,F,P,[1,"modal-header"],[1,"modal-title"],["title",e,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["src","/client/assets/images/mascot/happy.svg","alt","",1,"mascot"],[1,"subtitle"],[1,"modal-footer","inputs"],["inputName","stopDisplayModal","labelText",n,3,"ngModelChange","ngModel"],["type","button","role","button","value",t,1,"peertube-button","secondary-button",3,"click","key.enter"],["routerLink","/my-account","rel","noopener noreferrer","ngbAutofocus","",1,"peertube-button-link","primary-button",3,"click","key.enter"]];},template:function(n,t){n&1&&w0(0,ne,20,4,"ng-template",null,0,I$);},dependencies:[Tr,Me,Jn,qn,ln,Zh],styles:[".modal-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center}.mascot-fw[_ngcontent-%COMP%]{width:170px}.mascot[_ngcontent-%COMP%]{display:block;width:170px;height:220px;margin-inline-end:calc(1.325rem + .9vw)}@media(min-width:1200px){.mascot[_ngcontent-%COMP%]{margin-inline-end:2rem}}.subtitle[_ngcontent-%COMP%]{font-weight:600;margin-bottom:10px}li[_ngcontent-%COMP%]{margin-bottom:10px}"],changeDetection:1});}return i;})();/**i18n:c8855ca17fb20171aa9dd43d012e42547cb1f0cfd9c21d4dc05679bbbdf5ccb8*/export{me as AccountSetupWarningModalComponent};//# sourceMappingURL=chunk-CwE6g4RU.js.map