import{B as I,Ca as R,Ia as $,Ud as z,Vd as E,kg as H,sg as N,x as k,y as A}from"./chunk-MEUY652R.js";import{$c as T,Ea as x,Fd as f,Ha as c,Jd as j,Kb as D,Na as a,Nb as b,Pb as O,Ra as y,Sa as p,ba as s,eb as d,gb as h,ha as w,ia as _,lb as M,mb as m,nb as l,ob as g,rc as n,rf as B,sc as r,uf as v,vb as S,xb as P,zb as u,zd as L}from"./chunk-DA3HQ2LG.js";import"./chunk-LZHBRXCS.js";import"./chunk-QNERVMXC.js";import"./chunk-FK6H3RFT.js";import{i as C}from"./chunk-2AVGQ2MQ.js";function J(e,G){if(e&1){let t=S();m(0,"mat-toolbar",0)(1,"mat-toolbar-row")(2,"a",2),P("click",function(){w(t);let o=u();return _(o.goHome())}),g(3,"img",3),n(4,"async"),n(5,"async"),l()()()}if(e&2){let t=u();c(3),M("src",t.isSpecial?r(4,1,t.themeService.printLogo$):r(5,3,t.themeService.defaultLogo$),x)}}function K(e,G){e&1&&(m(0,"div",1)(1,"div",4),g(2,"img",5),l(),m(3,"div",6)(4,"h2"),b(5),n(6,"translate"),l()()()),e&2&&(c(5),O("",r(6,1,"Us\u0142uga niedost\u0119pna, za moment nast\u0105pi przekierowanie na ekran logowania"),"..."))}var F=(()=>{class e{constructor(t,i,o,q){this.httpClient=t,this.auth=i,this.router=o,this.themeService=q,this.isAuth$=this.auth.isAuth$,this.isSpecial=f.loginPageType!=="old"}ngOnInit(){this.tryToConnect()}goHome(){this.router.navigate([""])}tryToConnect(){return C(this,null,function*(){try{let t=yield this.httpClient.get(f.apiUrl+"/values/ping",{responseType:"text"}).toPromise();this.router.navigate(["auth/login"])}catch(t){setTimeout(()=>{this.tryToConnect()},5e3),console.error(t)}})}static{this.\u0275fac=function(i){return new(i||e)(a(L),a(N),a(B),a($))}}static{this.\u0275cmp=y({type:e,selectors:[["app-server-down"]],hostVars:2,hostBindings:function(i,o){i&2&&D("special-theme",o.isSpecial)},standalone:!1,decls:4,vars:6,consts:[[1,"toolbar"],["id","server-down","fxLayout","column","fxLayoutAlign","center center","fxLayoutGap","20px"],["href","javascript:void(0);",2,"padding-top","8px","margin-right","0px",3,"click"],["alt","Symfonia ERP e-Pracownik Logo","height","52",3,"src"],[1,"server-down-image"],["src","../../../assets/img/illustrations/server_down.svg","alt","server_down"],["padding",""]],template:function(i,o){i&1&&(d(0,J,6,5,"mat-toolbar",0),n(1,"async"),d(2,K,7,3,"div",1),n(3,"async")),i&2&&(h(r(1,2,o.isAuth$)?-1:0),c(2),h(r(3,4,o.isAuth$)?-1:2))},dependencies:[k,A,I,E,z,T,j],styles:[".special-theme[_nghost-%COMP%]{display:block;min-height:100vh;background:#fff}.special-theme[_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%]{background:#fff;color:#040507}.special-theme[_nghost-%COMP%]   #server-down[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#040507}#server-down[_ngcontent-%COMP%]{padding-top:50px}#server-down[_ngcontent-%COMP%]   .server-down-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-height:50vh;max-width:80vw}#server-down[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:20px;text-align:center;font-weight:500}.toolbar[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);padding:0 16px 0 8px}@media(max-width:597px){.toolbar[_ngcontent-%COMP%]{height:64px}}"]})}}return e})();var Q=[{path:"",component:F,canLoad:[R]},{path:"**",redirectTo:""}],U=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=p({type:e})}static{this.\u0275inj=s({imports:[v.forChild(Q),v]})}}return e})();var ue=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=p({type:e})}static{this.\u0275inj=s({imports:[U,H]})}}return e})();export{ue as ServerDownModule};
