import{E as n,Mc as L,Pd as v,Qf as U,Sc as z,Uc as s,Wc as p,Xc as S,ad as O,ea as m,l as h,rb as f,t as l,u as d}from"./chunk-SKPDQO4E.js";var c=class extends S{http;sessionService;configurationService;interactionService;constructor(e,i,t,r){super(e,i,t,r),this.http=e,this.sessionService=i,this.configurationService=t,this.interactionService=r}getSummary(){return this.requestGet(`/${this.sessionService.currentOrganizationId}/summary`,"LicenseSummaryResponse",s.User,p.User)}upsertUserExpression(e){return this.requestPost(`/${this.sessionService.currentOrganizationId}/upsert/userexpression`,{userExpressionType:e},null,s.User,p.User)}downloadDefinitonFile(){return this.requestGetFileResponse(`/${this.sessionService.currentOrganizationId}/deffile`,s.User)}uploadLicenseFile(e){return this.requestPostFormData(`/${this.sessionService.currentOrganizationId}/licfile`,e,null,s.User)}getOrganizationLogo(){return this.requestGetFileResponse(`/${this.sessionService.currentOrganizationId}/organization/logo`,s.User)}uploadOrganizationLogo(e){return this.requestPostFormData(`/${this.sessionService.currentOrganizationId}/organization/logo/upload`,e,"",s.User,p.User)}removeOrganizationLogo(){return this.requestPostEmptyResponse(`/${this.sessionService.currentOrganizationId}/organization/logo/remove`,{},s.User,p.User)}};var y=function(a,e,i,t){var r=arguments.length,o=r<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,i):t,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(a,e,i,t);else for(var g=a.length-1;g>=0;g--)(u=a[g])&&(o=(r<3?u(o):r>3?u(e,i,o):u(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o},E=class extends z{http;configurationService;interactionService;sessionService;apiLicense;sourceOrganizationLogoUpdated=new h;sourceOrganizationLogoStateUpdated=new h;onOrganizationLogoUpdated=this.sourceOrganizationLogoUpdated.asObservable();onOrganizationLogoStateUpdated=this.sourceOrganizationLogoStateUpdated.asObservable();_isDefaultOrganizationLogo=!0;constructor(e,i,t,r){super(t,r),this.http=e,this.configurationService=i,this.interactionService=t,this.sessionService=r,this.apiLicense=new c(this.http,this.sessionService,this.configurationService,this.interactionService)}getSummary(){return this.apiLicense.getSummary().pipe(n(e=>this.handleError(e,[])))}upsertUserExpression(e){return this.apiLicense.upsertUserExpression(e).pipe(n(i=>this.handleError(i,[])))}downloadDefinitonFile(){return this.apiLicense.downloadDefinitonFile().pipe(n(e=>this.handleError(e,[])))}uploadLicenseFile(e){return this.apiLicense.uploadLicenseFile(e).pipe(n(i=>this.handleError(i,[])))}getOrganizationLogo(){return this.apiLicense.getOrganizationLogo().pipe(n(e=>e.status==L.NotFound?l(()=>e):this.handleError(e,[])))}uploadOrganizationLogo(e){return this.apiLicense.uploadOrganizationLogo(e).pipe(d(i=>(this.organizationLogoUpdated(),i))).pipe(n(i=>this.handleError(i,[])))}removeOrganizationLogo(){return this.apiLicense.removeOrganizationLogo().pipe(d(e=>(this.organizationLogoUpdated(),e))).pipe(n(e=>this.handleError(e,[])))}organizationLogoUpdated(){this.sourceOrganizationLogoUpdated.next(void 0)}organizationLogoStateUpdated(){this.sourceOrganizationLogoStateUpdated.next(void 0)}get isDefaultOrganizationLogo(){return this._isDefaultOrganizationLogo}set isDefaultOrganizationLogo(e){this._isDefaultOrganizationLogo=e,this.organizationLogoStateUpdated()}static ctorParameters=()=>[{type:f},{type:O},{type:U},{type:v}]};E=y([m({providedIn:"root"})],E);export{E as a};
