import{D as c,E as u}from"./chunk-JE2X3YFA.js";import{Kh as r,Lh as f,q as t,r as d}from"./chunk-GDJMZZ4C.js";import{Rd as l,sa as s,xa as h}from"./chunk-4HFZZ7HS.js";import{a,e as m}from"./chunk-SZAW6ZBW.js";var E,A=m(()=>{d();f();l();u();E=(()=>{class n{constructor(i){this.serverInformationService=i,this.subscribeToPublicServerInformationChange()}getMainAuthentication(){let i;return this.authenticationsDetails.forEach(e=>{if(e.type===t.Domain){let o=e.domains?.find(v=>Object.prototype.hasOwnProperty.call(v,"isMain"));o&&(i=new r(a({},e)),i.domains=[o])}else Object.prototype.hasOwnProperty.call(e,"isMain")&&(i=new r(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===t.Domain),this.hasAuthenticationAzureAD=this.serverInformationService.isAuthenticationProviderEnabled(t.AzureAD),this.hasAuthenticationWithDvls=this.serverInformationService.isAuthenticationProviderEnabled(t.Builtin),this.hasAuthenticationWithDatabase=this.serverInformationService.isAuthenticationProviderEnabled(t.SqlServer),this.hasAuthenticationWithOkta=this.serverInformationService.isAuthenticationProviderEnabled(t.Okta),this.hasAuthenticationWithPingOne=this.serverInformationService.isAuthenticationProviderEnabled(t.PingOne),this.hasAuthenticationWithContractor=this.serverInformationService.isAuthenticationProviderEnabled(t.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)(h(c))}}static{this.\u0275prov=s({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})()});export{E as a,A as b};
