import{d as F,h as O,i as m}from"./chunk-F46V5MTM.js";import{Aa as L,C as I,Ca as M,Ja as R,Sa as _,bb as j,db as P,eb as A,ha as D,l as x,r as k,t as w,za as T}from"./chunk-3H2Q52KW.js";import{Aa as f,Ab as C,E as p,Ec as s,Gc as S,L as h,Qc as y,_ as g,bc as a,cc as l,ia as c,lb as v,mb as o,nc as b,u as d}from"./chunk-DF3EMM3Z.js";import"./chunk-2AVGQ2MQ.js";var X=(()=>{class i{#t;#e;#o;constructor(e,t,n,u,Y){this.authService=e,this.router=t,this.apiService=n,this.titleService=u,this.userRoleService=Y,this.title="Logout Page",this.#t=c(k),this.#e=c(R),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),d(r=>r.theme?.match(/^[A-Za-z0-9\s]+/)?.[0]),p(r=>["dark","light","auto"].includes(r)),g(r=>{this.colorMode.set(r)}),I(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.\u0275fac=function(t){return new(t||i)(o(F),o(w),o(m),o(x),o(O))}}static{this.\u0275cmp=C({type:i,selectors:[["app-logout"]],features:[y([m])],decls:17,vars:1,consts:[[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,n){t&1&&(a(0,"div",0)(1,"c-container",1)(2,"c-row",2)(3,"c-col",3)(4,"c-card-group")(5,"c-card",4)(6,"c-card-body")(7,"form",5)(8,"h2"),s(9,"You have been successfully logged out"),l(),a(10,"c-row")(11,"c-col",6)(12,"button",7),b("click",function(){return n.goToLogin()}),s(13," Login to Portal "),l()()()()()()()()()()(),a(14,"div",8)(15,"a",9),s(16),l()()),t&2&&(v(16),S("\xA9 CrashPlan ",n.currentYear," "))},dependencies:[j,A,P,M,T,L,_,D],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 i})();export{X as LogoutComponent};
