import{b as $,c as C}from"./chunk-YBNTOQCK.js";import{be as I,d as p,na as x,ta as h,ya as S}from"./chunk-WL5U2YIT.js";import{e as d}from"./chunk-ADEKKGI2.js";var F,D=d(()=>{I();C();x();I();F=(()=>{let o=class o{constructor(){this.translatorService=S($)}initComboEnum(t,r=[],i=!1,c=!1,l=0,s=null,f=null){let v=[],g=this.getEnumValues(t);for(let e of g){if(r.indexOf(e)>=0)continue;let a=this.translatorService.translateEnum(t,e),O=c?a:+e;if(t[e]==="Default"&&t[l]&&t[e]!==t[l]&&r.indexOf(l)===-1){let n=this.translatorService.translateEnum(t,l);if(l!=null&&s!=null&&t[l]==="Inherited"){let j=this.translatorService.translateEnum(t,s);a=`${a} (${n}) \u21A6 ${j}`}else a=`${a} (${n})`}else if(t[e]==="Inherited"&&t[s]&&t[e]!==t[s]&&r.indexOf(s)===-1){let n=this.translatorService.translateEnum(t,s);a=`${a} (${n})`}else if((t[e]==="SystemSettings"||t[e]==="DataSourceSettings")&&t[f]&&t[e]!==t[f]&&r.indexOf(f)===-1){let n=this.translatorService.translateEnum(t,f);a=`${a} (${n})`}v.push({label:a,value:O})}return i&&v.sort((e,a)=>e.label.localeCompare(a.label,void 0,{usage:"sort",numeric:!0})),v}getComboEnum(t){return new p(r=>{r.next(this.getEnumValues(t).map(i=>({label:this.translatorService.translateEnum(t,i),value:+i}))),r.complete()})}getComboEnumAsString(t){return new p(r=>{let i=[];for(let c of Object.keys(t))parseInt(c,10)>=0&&i.push({label:this.translatorService.translateEnum(t,c),value:t[c]});r.next(i),r.complete()})}getEnumValues(t){return Object.values(t).filter(r=>!isNaN(r))}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=h({token:o,factory:o.\u0275fac,providedIn:"root"});let b=o;return b})()});export{F as a,D as b};
