import{B as h,I as S}from"./chunk-HTXYTVN4.js";import{b as _,c as y}from"./chunk-YBNTOQCK.js";import"./chunk-LDWBA6DZ.js";import{Ec as v,Qb as p,Xc as b,Yc as c,_c as g,be as u,tb as m,xc as r,ya as d,yb as i,yc as n,zc as x}from"./chunk-WL5U2YIT.js";import{e as f}from"./chunk-ADEKKGI2.js";var A,E=f(()=>{u();S();y();u();A=(()=>{let s=class s{constructor(){this.activatedRoute=d(h),this.translatorService=d(_),this.MESSAGE_CODES=new Map([["012",{messageKey:"lblLogoutInAnotherPage",titleKey:"lblYouHaveBeenLoggedOut",severity:"success"}]])}ngOnInit(){let t=this.activatedRoute.snapshot.queryParams.code;(!t||!this.MESSAGE_CODES.has(t))&&(t="012");let e=this.MESSAGE_CODES.get(t);this.boxMessageStyle=this.getBoxStyle(e.severity),this.message=this.translatorService.translate(e.messageKey),this.title=e.titleKey?this.translatorService.translate(e.titleKey):"",this.activatedRoute.snapshot.queryParamMap.keys.forEach(o=>{if(o!=="code"){let l=this.activatedRoute.snapshot.queryParams[o];l&&/^[a-zA-Z0-9\s@.-]+$/.test(l)&&(this.message=this.message.replace(`{${o}}`,l))}})}getBoxStyle(t){return t==="error"?"box__message__error":"box__message__success"}};s.\u0275fac=function(e){return new(e||s)},s.\u0275cmp=p({type:s,selectors:[["dvls-app-message"]],decls:9,vars:5,consts:[[1,"bg-[url('/assets/images/login/dvls-light.svg')]","bg-no-repeat","bg-cover","bg-center","h-screen","overflow-auto"],[1,"flex","flex-col","items-center","justify-center","min-h-full"],[1,"box","rounded-3xl"],[1,"box__logo"],["alt","Devolutions Server",1,"dvls-home-logo",3,"src"],[1,"box__title"]],template:function(e,o){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),x(4,"img",4),n(),r(5,"div",5),c(6),n(),r(7,"div"),c(8),n()()()()),e&2&&(i(4),v("src","assets/images/devolutions-password-server-logo.svg",m),i(2),g(" ",o.title," "),i(),b(o.boxMessageStyle),i(),g(" ",o.message," "))},styles:[".box[_ngcontent-%COMP%]{color:#424242;text-align:center;width:460px;box-shadow:10px 10px 115px 40px #00336624;padding:31px 44px 12px;z-index:1;background-color:#fff}.box[_ngcontent-%COMP%]   .box__logo[_ngcontent-%COMP%]   .dvls-home-logo[_ngcontent-%COMP%]{box-sizing:border-box;margin:0 auto;max-width:300px;overflow:hidden;padding:25px;position:relative;width:100%}.box[_ngcontent-%COMP%]   .box__title[_ngcontent-%COMP%]{font-size:1.4rem;color:#0068c3;font-weight:700}.box[_ngcontent-%COMP%]   .box__message__success[_ngcontent-%COMP%]{margin:25px;color:#406900;background-color:#f8fbf4;padding:12px;border-radius:4px;border-left:#78b41b 2px solid}.box[_ngcontent-%COMP%]   .box__message__error[_ngcontent-%COMP%]{margin:25px;color:var(--red-700-text-color);background-color:var(--red-700);padding:12px;border-radius:4px;border-left:var(--red-primary) 2px solid}"]});let a=s;return a})()});E();export{A as AppMessageComponent};
