"use strict";(self.webpackChunkmsc_queue_fe=self.webpackChunkmsc_queue_fe||[]).push([[778],{8778:(p,c,s)=>{s.r(c),s.d(c,{SSOLoginModule:()=>f});var u=s(6814),e=s(4798),a=s(7465),i=s(9467),h=s(6138),l=s(8040),g=s(5031);let S=(()=>{class o{constructor(n,t,r,v,d){this.route=n,this.router=t,this.loginService=r,this.notification=v,this.authState=d}ngOnInit(){this.route.queryParams.subscribe(n=>{this.loginService.authenticate(n.token).subscribe({next:t=>{localStorage.setItem(a.BU.TOKEN,t.token),localStorage.setItem(a.BU.USER,JSON.stringify(t.user)),this.authState.dispatch(t.user),this.router.navigate([n.ReturnURL])},error:t=>{console.log(t),this.notification.error(t.error.message,"")}})})}static#t=this.\u0275fac=function(t){return new(t||o)(i.Y36(e.gz),i.Y36(e.F0),i.Y36(h.r),i.Y36(l.g),i.Y36(g.V))};static#o=this.\u0275cmp=i.Xpm({type:o,selectors:[["app-login"]],decls:2,vars:0,template:function(t,r){1&t&&(i.TgZ(0,"p"),i._uU(1,"Login from MSA"),i.qZA())},encapsulation:2})}return o})(),m=(()=>{class o{static#t=this.\u0275fac=function(t){return new(t||o)};static#o=this.\u0275mod=i.oAB({type:o});static#i=this.\u0275inj=i.cJS({imports:[e.Bz.forChild([{path:"",component:S}]),e.Bz]})}return o})(),f=(()=>{class o{static#t=this.\u0275fac=function(t){return new(t||o)};static#o=this.\u0275mod=i.oAB({type:o});static#i=this.\u0275inj=i.cJS({imports:[u.ez,m]})}return o})()}}]);