import{a as p,b as g,d as f}from"./chunk-R5GBW5HQ.js";import{B as l,Ed as h,H as c,S as o,X as u,pd as m,va as s,ya as n}from"./chunk-3NIPUOIR.js";var v=(()=>{class i{constructor(r,e){this.http=r,this.commonHttpErrorService=e}getCompanyProfile(){return this.http.get("companyprofile").pipe(o(this.commonHttpErrorService.handleError))}updateCompanyProfile(r){return this.http.post("companyProfile",r).pipe(o(this.commonHttpErrorService.handleError))}updateLocalStorage(r){return this.http.post("storage",r).pipe(o(this.commonHttpErrorService.handleError))}getS3Config(){return this.http.get("storage").pipe(o(this.commonHttpErrorService.handleError))}saveOpenAiKey(r){return this.http.post("open-ai/key",r).pipe(o(this.commonHttpErrorService.handleError))}getOpenAiApiKey(){return this.http.get("open-ai/key").pipe(o(this.commonHttpErrorService.handleError))}getGoogleGeminiApiKey(){return this.http.get("google-gemini/key")}saveGoogleGeminiApiKey(r){return this.http.post("google-gemini/key",r).pipe(o(this.commonHttpErrorService.handleError))}updatePdfSignatureSetting(r){return this.http.post("allow-pdf-signature",{allowPdfSignature:r}).pipe(o(this.commonHttpErrorService.handleError))}static{this.\u0275fac=function(e){return new(e||i)(n(m),n(g))}}static{this.\u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var C=(()=>{class i{constructor(r,e,t){this.companyProfileService=r,this.router=e,this.securityService=t}resolve(r,e){return this.companyProfileService.getCompanyProfile().pipe(u(1),c(t=>t?(t.logoUrl&&(t.logoUrl=`${p.apiUrl}${t.logoUrl}`),t.bannerUrl&&(t.bannerUrl=`${p.apiUrl}${t.bannerUrl}`),t.smallLogoUrl&&(t.smallLogoUrl=`${p.apiUrl}${t.smallLogoUrl}`),this.securityService.updateProfile(t),t.languages&&t.languages.forEach(a=>{a.imageUrl=`${p.apiUrl}${a.imageUrl}`}),l(t)):(this.router.navigate(["/dashboard"]),null)))}static{this.\u0275fac=function(e){return new(e||i)(n(v),n(h),n(f))}}static{this.\u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{v as a,C as b};
