import{d as s}from"./chunk-MEOEOGXB.js";import{b as x,i as D}from"./chunk-DSI4EXW5.js";import{D as E,Ia as N,Ja as k,Ka as w,ga as M,l as P,ma as y,na as I,pa as A,r as b,ra as G,u as L,za as R}from"./chunk-IMCLO7B5.js";import{Aa as f,Ab as v,E as d,Gc as C,Ic as T,L as h,Rc as O,_ as p,bc as l,cc as a,ia as c,lb as _,mb as r,mc as u,qc as S,u as m}from"./chunk-QPCTCEE3.js";import"./chunk-Z6FMTJBH.js";var Q=(()=>{class n{#t;#e;#o;constructor(e,t,o,g,U){this.authService=e,this.router=t,this.apiService=o,this.titleService=g,this.userRoleService=U,this.title="Logout Page",this.#t=c(b),this.#e=c(G),this.colorMode=this.#e.colorMode,this.#o=c(f),this.currentYear=new Date().getFullYear(),this.#e.localStorageItemName.set("theme-default"),this.#e.eventName.set("ColorSchemeChange"),this.#t.queryParams.pipe(h(1),m(i=>i.theme?.match(/^[A-Za-z0-9\s]+/)?.[0]),d(i=>["dark","light","auto"].includes(i)),p(i=>{this.colorMode.set(i);}),E(this.#o)).subscribe(),this.titleService.setTitle(this.title);}ngOnInit(){try{this.logout();}catch(e){console.error("ngOnInit error in LogoutComponent:",e);}}logout(){try{let e=localStorage.getItem("theme-default");this.authService.clearToken(),localStorage.clear(),e&&localStorage.setItem("theme-default",e),this.userRoleService.clear(),this.router.url!=="/logout"&&this.router.navigate(["/logout"]);}catch(e){console.error("Logout failed:",e);}}goToLogin(){this.authService.clearToken(),this.router.navigate(["/login"]);}static{this.ɵfac=function(t){return new(t||n)(r(x),r(L),r(s),r(P),r(D));};}static{this.ɵcmp=v({type:n,selectors:[["app-logout"]],features:[O([s])],decls:17,vars:1,consts:()=>{let e;e="You have been successfully logged out";let t;return t="Login to Portal",[e,t,[1,"bg-light","dark:bg-transparent","min-vh-100","d-flex","flex-row","align-items-center"],["breakpoint","md"],[1,"justify-content-center"],["lg","10","xl","8"],[1,"p-4"],["cForm",""],["xs","6"],["cButton","","color","primary",1,"logout-btn",3,"click"],[1,"text-center"],["href","https://www.crashplan.com","target","_blank",2,"color","#062D4D","text-decoration","none"]];},template:function(t,o){t&1&&(l(0,"div",2)(1,"c-container",3)(2,"c-row",4)(3,"c-col",5)(4,"c-card-group")(5,"c-card",6)(6,"c-card-body")(7,"form",7)(8,"h2"),u(9,0),a(),l(10,"c-row")(11,"c-col",8)(12,"button",9),S("click",function(){return o.goToLogin();}),u(13,1),a()()()()()()()()()()(),l(14,"div",10)(15,"a",11),C(16),a()()),t&2&&(_(16),T("\xA9 CrashPlan ",o.currentYear," "));},dependencies:[N,w,k,A,y,I,R,M],styles:[".logout-btn[_ngcontent-%COMP%]{color:#fff!important;background-color:#35b7f4!important;border-color:#35b7f4!important;transition:none}.logout-btn[_ngcontent-%COMP%]:hover{transition:background-color .3s ease-in-out,box-shadow .3s ease-in-out;background-color:#35b7f4!important;box-shadow:0 0 5px #0003}"]});}}return n;})();export{Q as LogoutComponent};/**i18n:baf94ddeebe8e238ad6726a2c32767605608f8ef2ffb012a899af1d72d1eba78*/