import{B as c,C as d}from"./chunk-ANSWGJBN.js";import{q as t,qh as n,r as l,rh as u}from"./chunk-XBRJZCAD.js";import{Gd as f,sa as a,xa as h}from"./chunk-JSJB5BKT.js";import{a as o,e as m}from"./chunk-SZAW6ZBW.js";var D,A=m(()=>{l();u();f();d();D=(()=>{class r{constructor(i){this.serverInformationService=i,this.subscribeToPublicServerInformationChange()}getMainAuthentication(){let i;return this.authenticationsDetails.forEach(e=>{if(e.type===t.Domain){let s=e.domains?.find(v=>Object.prototype.hasOwnProperty.call(v,"isMain"));s&&(i=new n(o({},e)),i.domains=[s])}else Object.prototype.hasOwnProperty.call(e,"isMain")&&(i=new n(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.hasEmergencyLogin=i?.enableEmergencyLogin||!1,this.hasServerInformationError=this.serverInformationService?.hasError,this.isSSOEnabled=i?.windowsAuthenticationEnabled??!1,this.serverCustomImage=i?.serverLogoLarge?`data:image/png;base64,${this.serverInformationService.publicServerInformation.serverLogoLarge}`:""}static{this.\u0275fac=function(e){return new(e||r)(h(c))}}static{this.\u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})()});export{D as a,A as b};
