import {J,aO as M,gV as Vy,c as tS,aM as AD,aQ as y,gW as Su,bJ as F,aa as ye,aN as r4,ad as ce}from'./main-WUGO6e7n.js';var I,A=J(()=>{M();Vy();tS();AD();I=(()=>{class n{constructor(i){this.serverInformationService=i,this.subscribeToPublicServerInformationChange();}getMainAuthentication(){let i;return this.authenticationsDetails.forEach(e=>{if(e.type===y.Domain){let s=e.domains?.find(v=>v.isMain===!0);s&&(i=new Su(F({},e)),i.domains=[s]);}else e.isMain===!0&&(i=new Su(e));}),i}subscribeToPublicServerInformationChange(){this.serverInformationService.publicServerInformationChange.subscribe(i=>this.initServerProperties(i));}initServerProperties(i){this.serverVersion=i?.version,this.authenticationsDetails=i?.authenticationsDetails??[],this.hasAuthenticationWithAD=!!i?.authenticationsDetails.find(e=>e.type===y.Domain),this.hasAuthenticationAzureAD=this.serverInformationService.isAuthenticationProviderEnabled(y.AzureAD),this.hasAuthenticationWithDvls=this.serverInformationService.isAuthenticationProviderEnabled(y.Builtin),this.hasAuthenticationWithDatabase=this.serverInformationService.isAuthenticationProviderEnabled(y.SqlServer),this.hasAuthenticationWithOkta=this.serverInformationService.isAuthenticationProviderEnabled(y.Okta),this.hasAuthenticationWithPingOne=this.serverInformationService.isAuthenticationProviderEnabled(y.PingOne),this.hasAuthenticationWithContractor=this.serverInformationService.isAuthenticationProviderEnabled(y.Contractor),this.hasEmergencyLogin=i?.enableEmergencyLogin||!1,this.hasServerInformationError=this.serverInformationService?.hasError,this.isSSOEnabled=i?.windowsAuthenticationEnabled??!1,this.hideDomainLoginWhenSSOEnabled=i?.hideDomainLoginWhenSSOEnabled??!1,this.serverCustomImage=i?.serverLogoLarge?`data:image/png;base64,${this.serverInformationService.publicServerInformation.serverLogoLarge}`:"";}static{this.\u0275fac=function(e){return new(e||n)(ye(r4))};}static{this.\u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"});}}return n})();});export{A,I};