import{o as _,v as f}from"./chunk-HW6LKGMV.js";import"./chunk-HYPRVELK.js";import{b as u,c as M}from"./chunk-YTY7HHO3.js";import"./chunk-UOI75ONS.js";import{$c as d,Ab as s,Qb as p,Rd as b,Zc as c,jc as m,nc as x,vb as g,wc as n,xc as r,ya as l,yc as v}from"./chunk-4HFZZ7HS.js";import{e as h}from"./chunk-SZAW6ZBW.js";var w,S=h(()=>{b();f();M();b();w=(()=>{class i{constructor(){this.activatedRoute=l(_),this.translatorService=l(u),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 a=this.activatedRoute.snapshot.queryParams[o];a&&/^[a-zA-Z0-9\s@.-]+$/.test(a)&&(this.message=this.message.replace(`{${o}}`,a))}})}getBoxStyle(t){return t==="error"?"box__message__error":"box__message__success"}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=p({type:i,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&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),v(4,"img",4),r(),n(5,"div",5),c(6),r(),n(7,"div"),c(8),r()()()()),e&2&&(s(4),m("src","assets/images/devolutions-password-server-logo.svg",g),s(2),d(" ",o.title," "),s(),x(o.boxMessageStyle),s(),d(" ",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}"]})}}return i})()});S();export{w as AppMessageComponent};
