1import{c as S,d as D}from"./chunk-EYT2L6OO.js";import{a as R}from"./chunk-7G6C7T2N.js";import{L as B}from"./chunk-AJRHK7D2.js";import"./chunk-QGTBO2LV.js";import"./chunk-TBVUQWMS.js";import{f as U,h as M,n as j}from"./chunk-FAGCLODN.js";import"./chunk-MY5YK5O5.js";import"./chunk-4NGQH4V6.js";import"./chunk-PWQXPZVK.js";import{a as E}from"./chunk-Y4AYZAWK.js";import"./chunk-7WAXKT5I.js";import"./chunk-MHLI7EB3.js";import"./chunk-KIBC2ZGT.js";import"./chunk-6K3X73CK.js";import"./chunk-DLTOIL4G.js";import"./chunk-334MXCTX.js";import{H as k}from"./chunk-OD4FXCMW.js";import{Ac as _,Fa as g,Fc as v,Ga as C,Hc as s,Ib as d,Ob as b,Pb as x,V as y,Wc as m,Yc as T,hc as l,jc as c,la as f,o as p,oc as w,pc as r,qc as a,rc as I,ua as P,zb as n}from"./chunk-T2TVCV7P.js";import"./chunk-BBHHUGUF.js";function O(o,e){if(o&1){let t=_();r(0,"button",9),v("click",function(){g(t);let h=s(2);return C(h.goToPhh())}),m(1," Go to Powerhouse Hub Portal "),a()}}function N(o,e){if(o&1){let t=_();r(0,"button",9),v("click",function(){g(t);let h=s(2);return C(h.signInViaPassword())}),m(1," Sign in via Ausmed Password "),a()}}function L(o,e){o&1&&(r(0,"h6"),m(1," Redirecting... "),a())}function $(o,e){if(o&1&&(r(0,"div",8),m(1),a()),o&2){let t=s(2);n(),T(" ",t.authError," ")}}function z(o,e){if(o&1&&(r(0,"div",4)(1,"div",5),I(2,"mn-org-logo",6),l(3,O,2,0,"button",7),l(4,N,2,0,"button",7),l(5,L,2,0,"h6"),l(6,$,2,1,"div",8),a()()),o&2){let t=s();n(2),w("orgCode",t.orgCode)("size","xl"),n(),c(t.showPortalBtn?3:-1),n(),c(t.showPortalBtn?4:-1),n(),c(!t.showPortalBtn&&!t.authError?5:-1),n(),c(t.authError?6:-1)}}var u=class o{constructor(e,t,i){this.auth=e;this.router=t;this.route=i;this.showPortalBtn=!1}ngOnInit(){this.route.params.pipe(f(e=>(this.orgCode=e?.orgCode?e.orgCode.toLowerCase():void 0,this.portalUrl=R(this.orgCode,E.production),this.portalUrl?this.route.queryParams:p)),f(e=>{let t=e&&e.jwt;return t?this.auth.getPhhJWTToken(this.orgCode,t):(this.showPortalBtn=!0,p)}),y(1)).subscribe(e=>{if(e){this.showPortalBtn=!1;let t=e?.invitation,i=t&&t.orgUserID&&t.orgID?`/join-org?orgID=${t.orgID}&invitationID=${t.orgUserID}`:null;i?this.router.navigateByUrl(i):e.token&&(this.auth.setToken(e.token),this.router.navigateByUrl(`/my-team/overview/${this.orgCode}`))}},e=>{this.showPortalBtn=!0,console.log(e),this.authError="Your manager hasn't enabled your access yet. Please contact your manager for more information."})}goToPhh(){this.portalUrl&&(location.href=this.portalUrl)}signInViaPassword(){this.router.navigateByUrl("/sign-in-password")}static{this.\u0275fac=function(t){return new(t||o)(d(B),d(M),d(U))}}static{this.\u0275cmp=b({type:o,selectors:[["mn-phh"]],decls:5,vars:1,consts:[["id","view-signIn",1,"page-content","h-full","px-0","px-md-4","py-4","d-flex","align-items-center"],[1,"container-fluid","content__container"],[1,"row","justify-content-center"],[1,"col-12","col-sm-8","col-md-6","col-lg-5"],[1,"card"],[1,"card-body"],[1,"d-flex","mt-1","mb-2","justify-content-center",3,"orgCode","size"],[1,"btn","btn-outline-primary","btn-block","my-3"],[1,"invalid-feedback"],[1,"btn","btn-outline-primary","btn-block","my-3",3,"click"]],template:function(t,i){t&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),l(4,z,7,6,"div",4),a()()()()),t&2&&(n(4),c(i.portalUrl?4:-1))},dependencies:[S],encapsulation:2})}};var F=[{path:":orgCode",component:u},{path:"**",redirectTo:""}],V=class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275mod=x({type:o})}static{this.\u0275inj=P({imports:[k,j.forChild(F),D]})}};export{V as PhhModule};
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.