import{a as Z}from"./chunk-BXPOMRLN.js";import"./chunk-5DDHXOCF.js";import{r as Q}from"./chunk-YLQIMX27.js";import{A as K,g as z,l as j}from"./chunk-I267ADJP.js";import{a as J}from"./chunk-NIY7P74G.js";import{$a as C,Db as G,Eb as U,Fa as d,Fb as v,Ga as m,Gc as X,La as h,Mb as W,Nb as w,Ob as b,Qf as Y,Sa as N,Ve as f,Xe as H,bc as k,fd as V,hg as B,ia as c,ib as o,ja as u,jb as i,kb as g,ob as y,qa as L,qb as p,rb as S,sb as A,tb as $,ub as I,vc as x,wb as T,xb as O,yg as q}from"./chunk-4JM6MIZ5.js";import{i as M}from"./chunk-QJQRWPYR.js";var ee=["modal"];function te(r,a){r&1&&(o(0,"li"),p(1,5),g(2,"strong"),S(),i());}function ne(r,a){r&1&&(o(0,"li"),p(1,6),g(2,"strong"),S(),i());}function oe(r,a){if(r&1){let n=y();o(0,"div",7)(1,"h4",8),A(2,1),i(),o(3,"button",9),T("click",function(){let t=c(n).close;return u(t());}),g(4,"my-global-icon",10),i()(),o(5,"div",11),g(6,"img",12),o(7,"div",13),A(8,2),i(),o(9,"p"),p(10,3),g(11,"strong"),S(),i(),o(12,"ul"),N(13,te,3,0,"li",14)(14,ne,3,0,"li",14),i()(),o(15,"div",15)(16,"my-peertube-checkbox",16),b("ngModelChange",function(t){c(n);let _=O();return w(_.stopDisplayModal,t)||(_.stopDisplayModal=t),u(t);}),i(),o(17,"input",17),T("click",function(){let t=c(n).close;return u(t());})("key.enter",function(){let t=c(n).close;return u(t());}),i(),o(18,"a",18),T("click",function(){let t=c(n).close;return u(t());})("key.enter",function(){let t=c(n).close;return u(t());}),A(19,4),i()();}if(r&2){let n=O();d(2),$(n.instanceName),I(2),d(11),C("ngIf",!n.hasAccountAvatar(n.user)),d(),C("ngIf",!n.hasAccountDescription(n.user)),d(2),W("ngModel",n.stopDisplayModal);}}var Ne=(()=>{let a=class a{userService;modalService;notifier;serverService;modal;created=new L();stopDisplayModal=!1;ref;user;LS_KEYS={NO_ACCOUNT_SETUP_WARNING_MODAL:"no_account_setup_warning_modal"};ngOnInit(){this.created.emit();}constructor(e,t,_,s){this.userService=e,this.modalService=t,this.notifier=_,this.serverService=s;}get instanceName(){return this.serverService.getHTMLConfig().instance.name;}hasAccountAvatar(e){return e.account.avatars.length!==0;}hasAccountDescription(e){return!!e.account.description;}shouldOpen(e){return!(this.modalService.hasOpenModals()||e.noAccountSetupWarningModal===!0||f.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:!0,backdrop:"static",keyboard:!1,size:"md"}),this.ref.result.finally(()=>{this.stopDisplayModal===!0&&this.doNotOpenAgain();}));}doNotOpenAgain(){f.setItem(this.LS_KEYS.NO_ACCOUNT_SETUP_WARNING_MODAL,"true"),this.userService.updateMyProfile({noAccountSetupWarningModal:!0}).subscribe({next:()=>H.info("We will not open the account setup modal again."),error:e=>this.notifier.error(e.message)});}};M(a,"\u0275fac",function(t){return new(t||a)(m(q),m(Q),m(Y),m(B));}),M(a,"\u0275cmp",h({type:a,selectors:[["my-account-setup-warning-modal"]],viewQuery:function(t,_){if(t&1&&G(ee,7),t&2){let s;U(s=v())&&(_.modal=s.first);}},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let e;e="Loka \xFEessum glugga";let t;t="Ekki s\xFDna m\xE9r \xFEetta aftur";let _;_="Loka";let s;s="Velkomin/n \xE1 "+"\uFFFD0\uFFFD"+", k\xE6ri notandi!";let E;E="N\xFA er t\xEDmab\xE6rt a\xF0 setja upp notandaa\xF0ganginn \xFEinn!";let F;F="Hj\xE1lpa\xF0u umsj\xF3narf\xF3lki og \xF6\xF0rum notendum a\xF0 vita "+"\uFFFD#11\uFFFD"+"hver \xFE\xFA s\xE9rt"+"\uFFFD/#11\uFFFD"+" me\xF0 \xFEv\xED a\xF0:";let P;P="Setja upp";let D;D="Senda inn "+"\uFFFD#2\uFFFD"+"au\xF0kennismynd"+"\uFFFD/#2\uFFFD"+"";let R;return R="Skrifa "+"\uFFFD#2\uFFFD"+"l\xFDsingu"+"\uFFFD/#2\uFFFD"+"",[["modal",""],s,E,F,P,D,R,[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"],[4,"ngIf"],[1,"modal-footer","inputs"],["inputName","stopDisplayModal","labelText",t,3,"ngModelChange","ngModel"],["type","button","role","button","value",_,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(t,_){t&1&&N(0,oe,20,4,"ng-template",null,0,k);},dependencies:[X,x,J,Z,K,z,j,V],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}
/*# sourceMappingURL=account-setup-warning-modal.component-NWF7BOWK.css.map */`]}));let r=a;return r;})();export{Ne as AccountSetupWarningModalComponent};/**i18n:68865f44f2a527c44cf5136a17c76a0ff8308c2bae5c7c8d50070a5fb9847c44*///# sourceMappingURL=chunk-3OLEILKO.js.map