import{$ as Ehe,Br as Ux,Eo as kb,Fo as l$,Go as m5,Gr as Va,Hr as V,Ia as f$,Io as lA,Is as rh,J as EI,Lr as Uj,Ls as rx,No as kx,Oi as Zt,Oo as kj,Q as EV,Qi as bV,Qr as W$,Uo as m$,Wa as g,Yi as bI,ec as th,er as Qc,fc as vm,it as FB,mt as Fx,rc as u$,s as $x,ta as bi,u as AV,ua as cA,vc as wp,vr as She,xi as Yn}from"./chunk-B_pj7Jpm.js";import{t as X1}from"./chunk-CgIzqGPc.js";import{A as qn,O as ln,s as Jn}from"./chunk-BPHMC4rz.js";import{O as sr}from"./chunk-CR0lnyBO.js";import"./chunk-1IezKpCQ.js";import{t as q}from"./chunk-CEewNwum.js";var Z=[`modal`];function ee(_,t){_&1&&(wp(0,`li`),kx(1,5),th(2,`strong`),Fx(),kb())}function te(_,t){_&1&&(wp(0,`li`),kx(1,6),th(2,`strong`),Fx(),kb())}function ne(_,t){if(_&1){let e=AV();wp(0,`div`,7)(1,`h4`,8),l$(2,1),kb(),wp(3,`button`,9),rh(`click`,function(){let n=EI(e).close;return bI(n())}),th(4,`my-global-icon`,10),kb()(),wp(5,`div`,11),th(6,`img`,12),wp(7,`div`,13),l$(8,2),kb(),wp(9,`p`),kx(10,3),th(11,`strong`),Fx(),kb(),wp(12,`ul`),EV(13,ee,3,0,`li`),EV(14,te,3,0,`li`),kb()(),wp(15,`div`,14)(16,`my-peertube-checkbox`,15),lA(`ngModelChange`,function(n){EI(e);let u=f$();return W$(u.stopDisplayModal,n)||(u.stopDisplayModal=n),bI(n)}),kb(),kj(),wp(17,`input`,16),rh(`click`,function(){let n=EI(e).close;return bI(n())})(`key.enter`,function(){let n=EI(e).close;return bI(n())}),kb(),wp(18,`a`,17),rh(`click`,function(){let n=EI(e).close;return bI(n())})(`key.enter`,function(){let n=EI(e).close;return bI(n())}),l$(19,4),kb()()}if(_&2){let e=f$();FB(2),Ux(e.instanceName),u$(2),FB(11),bV(e.hasAccountAvatar(e.user)?-1:13),FB(),bV(e.hasAccountDescription(e.user)?-1:14),FB(2),cA(`ngModel`,e.stopDisplayModal),Uj()}}var J=class _{userService=g(Qc);modalService=g(sr);notifier=g(bi);serverService=g(Zt);modal=She(`modal`);created=Ehe();stopDisplayModal=!1;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(t){return t.account.avatars.length!==0}hasAccountDescription(t){return!!t.account.description}shouldAutoOpen(t){return!(this.modalService.hasOpenModals()||t.noAccountSetupWarningModal===!0||Yn.getItem(this.LS_KEYS.NO_ACCOUNT_SETUP_WARNING_MODAL)===`true`||this.hasAccountAvatar(t)&&this.hasAccountDescription(t)||this.userService.hasSignupInThisSession())}show(t){this.user=t,!this.ref&&(this.ref=this.modalService.open(this.modal(),{centered:!0,backdrop:`static`,keyboard:!1,size:`md`}),this.ref.result.finally(()=>{this.stopDisplayModal===!0&&this.doNotOpenAgain()}))}doNotOpenAgain(){Yn.setItem(this.LS_KEYS.NO_ACCOUNT_SETUP_WARNING_MODAL,`true`),this.userService.updateMyProfile({noAccountSetupWarningModal:!0}).subscribe({next:()=>V.info(`We will not open the account setup modal again.`),error:t=>this.notifier.handleError(t)})}static ɵfac=function(e){return new(e||_)};static ɵcmp=Va({type:_,selectors:[[`my-account-setup-warning-modal`]],viewQuery:function(e,i){e&1&&$x(i.modal,Z,5),e&2&&m$()},outputs:{created:`created`},decls:2,vars:0,consts:()=>{let t;t="Feche este modal";let e;e="Não me mostre mais isso";let i;i="Fechar";let n;n=`Bem-vindo ao${`�0�`} , caro usuário!`;let u;u="É hora de configurar o perfil da sua conta!";let O;O=`Ajude os moderadores e outros usuários a saber${`�#11�`} quem é você${`�/#11�`} por:`;let f;f="Set up";let E;E=`Carregando um${`�#2�`} avatar${`�/#2�`}`;let F;return F=`Escrevendo um${`�#2�`} descrição${`�/#2�`}`,[[`modal`,``],n,u,O,f,E,F,[1,`modal-header`],[1,`modal-title`],[`title`,t,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`,e,3,`ngModelChange`,`ngModel`],[`type`,`button`,`role`,`button`,`value`,i,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(e,i){e&1&&rx(0,ne,20,4,`ng-template`,null,0,m5)},dependencies:[X1,q,Jn,qn,ln,vm],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})};export{J as AccountSetupWarningModalComponent};
//# debugId=97edf0bd-dbba-59ca-b280-50e9c6bf05d7
//# sourceMappingURL=chunk-Qc_BU0mV.js.map