import{b as p,c as S}from"./chunk-IOINCEV4.js";import{Gd as E,d as c,ma as g,sa as f,xa as m}from"./chunk-JSJB5BKT.js";import{e as h}from"./chunk-SZAW6ZBW.js";var w,d=h(()=>{g();E();S();w=(()=>{class i{constructor(t){this.translatorService=t}initComboEnum(t,e=[],r=!1,n=!1,s=0){let l=[],u=this.getEnumValues(t);for(let a of u)if(e.indexOf(a)<0){let o=this.translatorService.translateEnum(t,a),b=n?o:+a;if(t[a]==="Default"&&t[s]&&t[a]!==t[s]&&e.indexOf(s)===-1){let v=this.translatorService.translateEnum(t,s);o=`${o} (${v})`}l.push({label:o,value:b})}return r&&l.sort((a,o)=>a.label.localeCompare(o.label,void 0,{usage:"sort",numeric:!0})),l}getComboEnum(t){return new c(e=>{e.next(this.getEnumValues(t).map(r=>({label:this.translatorService.translateEnum(t,r),value:+r}))),e.complete()})}getComboEnumAsString(t){return new c(e=>{let r=[];for(let n of Object.keys(t))parseInt(n,10)>=0&&r.push({label:this.translatorService.translateEnum(t,n),value:t[n]});e.next(r),e.complete()})}getEnumValues(t){return Object.values(t).filter(e=>!isNaN(e))}static{this.\u0275fac=function(e){return new(e||i)(m(p))}}static{this.\u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});export{w as a,d as b};
