1import{a as L}from"./chunk-57R7DUH4.js";import{a as x}from"./chunk-B3BHMLQU.js";import"./chunk-6R3YLT7W.js";import"./chunk-BPCLP3YZ.js";import"./chunk-ZFHZBGU7.js";import"./chunk-VVOZYPZ4.js";import"./chunk-CZ7ACIAY.js";import{b as B}from"./chunk-UGFI62GD.js";import{K as e,Oa as _,R as w,S as y,Za as P}from"./chunk-DL2RKDDC.js";import"./chunk-PYUQP7M5.js";import{a as b}from"./chunk-NOCSCHBA.js";import{h as S}from"./chunk-66NTOGIA.js";import"./chunk-KJJKJ7F6.js";import"./chunk-K3NVCAKM.js";import"./chunk-PRR73KC3.js";import{h as M}from"./chunk-NAGWTUXJ.js";import"./chunk-VFAF7UGW.js";import"./chunk-37JBEWWK.js";import{Ba as r,Cc as c,Dc as a,Ec as l,Fb as s,Fc as p,Ua as u,Vc as v,Xb as h,Xc as f,kd as g,md as C,vc as d,xc as m}from"./chunk-7WCNVARR.js";import"./chunk-6F4HVVOU.js";function E(i,O){if(i&1&&(a(0,"wui-heading",3),g(1),l()),i&2){let t=f();c("color",t.errorHeadingColor),s(),C(" ",t.errorMessage()," ")}}var q=(()=>{class i{constructor(){this.router=r(S),this.userService=r(B),this.queryStringFilterService=r(L),this.envService=r(M),this.navigationStateService=r(x),this.breadcrumbs=[{uri:"",title:"Staff Login"}],this.mastheadClass="no-masthead",this.hasError=u(null),this.errorMessage=u(null),this.wuiButtonSize=y,this.wuiButtonLevel=w,this.isBold=!1,this.headingColor=""}ngOnInit(){if(this.getEnvData(),this.navigationStateService.showPageLandingBanner(!0),this.navigationStateService.setPageLandingBannerConfig({mastheadClass:this.mastheadClass,breadcrumbs:this.breadcrumbs}),this.userService.isAuthenticated())this.router.navigate([this.envService.afterLoginDefaultRoute]);else{let t=this.queryStringFilterService.getQueryStringValue("exp",null),n=this.queryStringFilterService.getQueryStringValue("rejectReason",null);t==="true"?(this.hasError.set(!0),this.errorMessage.set("Your session has expired, please login again")):n==="winningstaff"&&(this.hasError.set(!0),this.errorMessage.set("Your account for this website has not been provisioned please contact helpdesk for further assistance"))}}getEnvData(){switch(!0){case this.envService.isWaTheme:this.buttonColor=e.waBurntOrange,this.textColor=e.waPantoneBlack,this.headingColor=e.waWinningGold,this.isBold=!0,this.errorHeadingColor=e.waCoralRed;break;case this.envService.isAolTheme:this.buttonColor=e.aolBlue,this.textColor=e.aolBlue,this.errorHeadingColor=e.aolRed;break;case this.envService.isAndooTheme:this.buttonColor=e.andooPowderBlue,this.textColor=e.andooMainBlue,this.errorHeadingColor=e.andooRed;break;default:this.headingColor="",this.isBold=!1,this.errorHeadingColor=e.waWineRed}}doSocialLogin(t){window.localStorage.setItem("login_source","admin"),this.userService.socialLogin(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=h({type:i,selectors:[["app-staff-google-login-page"]],decls:11,vars:7,consts:[[1,"google-login-page"],[1,"container"],[1,"wrapper"],["level","h3",1,"error",3,"color"],["level","h2",1,"login-heading",3,"bold","color"],[1,"login-button",3,"click","color","textColor","size","level"],["name","google",1,"google-icon"]],template:function(n,o){n&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),d(3,E,2,2,"wui-heading",3),a(4,"wui-heading",4),g(5," Login using Google account "),l(),a(6,"p"),g(7," Please use your Winning Appliances staff credentials to log in. If you are having trouble with your login or are unable to access the portal, please contact your website administrator. "),l(),a(8,"wui-button",5),v("click",function(){return o.doSocialLogin("google")}),p(9,"svg-icon",6),g(10," Login with Google "),l()()()()),n&2&&(s(3),m(o.hasError()?3:-1),s(),c("bold",o.isBold)("color",o.headingColor),s(4),c("color",o.buttonColor)("textColor",o.textColor)("size",o.wuiButtonSize.large)("level",o.wuiButtonLevel.secondary))},dependencies:[P,_,b],styles:[".google-login-page[_ngcontent-%COMP%]{min-height:20em;padding:3em 0}.container[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.container[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:2em}.login-button[_ngcontent-%COMP%]{margin:2em 0}.login-button[_ngcontent-%COMP%] .google-icon[_ngcontent-%COMP%]{width:18px}.error[_ngcontent-%COMP%]{display:block;margin-bottom:18px}.login-heading[_ngcontent-%COMP%]{display:block;margin-bottom:24px}"],changeDetection:0})}}return i})();export{q as StaffGoogleLoginPageComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.