import{g,P as Pc,r as rr,a as rc,$ as $t,w as wpe,C as Cpe,B as Bn,j,b as Pa,T as Tr,M as Me,J as Jn,q as qn,l as ln,X as Xh,_ as _0,D as D$,f as fx,c as DV,k as k2,s as sp,y as yV,u as ub,F as Fp,d as $I,G as GI,e as Pp,i as ix,h as sx,m as _2,n as Mx,o as bV,p as e$,t as GH,z as zB,v as ax,x as vV,A as w2,N as Nx,W as WH}from'./main-BiUBeaMj.js';var Z=["modal"];function ee(i,N){i&1&&(sp(0,"li"),ix(1,5),Pp(2,"strong"),sx(),ub());}function te(i,N){i&1&&(sp(0,"li"),ix(1,6),Pp(2,"strong"),sx(),ub());}function ne(i,N){if(i&1){let e=k2();sp(0,"div",7)(1,"h4",8),yV(2,1),ub(),sp(3,"button",9),Fp("click",function(){let t=$I(e).close;return GI(t());}),Pp(4,"my-global-icon",10),ub()(),sp(5,"div",11),Pp(6,"img",12),sp(7,"div",13),yV(8,2),ub(),sp(9,"p"),ix(10,3),Pp(11,"strong"),sx(),ub(),sp(12,"ul"),_2(13,ee,3,0,"li"),_2(14,te,3,0,"li"),ub()(),sp(15,"div",14)(16,"my-peertube-checkbox",15),Mx("ngModelChange",function(t){$I(e);let c=bV();return e$(c.stopDisplayModal,t)||(c.stopDisplayModal=t),GI(t);}),ub(),GH(),sp(17,"input",16),Fp("click",function(){let t=$I(e).close;return GI(t());})("key.enter",function(){let t=$I(e).close;return GI(t());}),ub(),sp(18,"a",17),Fp("click",function(){let t=$I(e).close;return GI(t());})("key.enter",function(){let t=$I(e).close;return GI(t());}),yV(19,4),ub()();}if(i&2){let e=bV();zB(2),ax(e.instanceName),vV(2),zB(11),w2(e.hasAccountAvatar(e.user)?-1:13),zB(),w2(e.hasAccountDescription(e.user)?-1:14),zB(2),Nx("ngModel",e.stopDisplayModal),WH();}}var me=(()=>{class i{userService=g(Pc);modalService=g(rr);notifier=g(rc);serverService=g($t);modal=wpe("modal");created=Cpe();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&&fx(t.modal,Z,5),n&2&&DV();},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let e;e="St\xE4ng dialogrutan";let n;n="Visa inte detta igen";let t;t="St\xE4ng";let c;c="V\xE4lkommen som "+"\uFFFD0\uFFFD"+"-anv\xE4ndare!";let O;O="Det \xE4r dags att skapa din kontoprofil!";let E;E="Hj\xE4lp moderatorer och andra "+"\uFFFD#11\uFFFD"+"l\xE4ra k\xE4nna dig"+"\uFFFD/#11\uFFFD"+" genom att:";let f;f="Konfigurera";let F;F="Ladda upp en "+"\uFFFD#2\uFFFD"+"profilbild"+"\uFFFD/#2\uFFFD"+"";let P;return P="Skriv en "+"\uFFFD#2\uFFFD"+"beskrivning"+"\uFFFD/#2\uFFFD"+"",[["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&&_0(0,ne,20,4,"ng-template",null,0,D$);},dependencies:[Tr,Me,Jn,qn,ln,Xh],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:fad79908930cbb4c308e7550a5fe49bb3841dbb330066a6429aebaa006173605*/export{me as AccountSetupWarningModalComponent};//# sourceMappingURL=chunk-BNyNITVm.js.map