import{A as T}from"./chunk-SIWG7NMF.js";import{a as O}from"./chunk-FM26JV5X.js";import{C as v,a as I,g as M,n as S}from"./chunk-53W3MT4O.js";import{$b as _,Bb as u,Sa as m,Tc as y,Vb as c,Wb as C,X as d,Xb as f,eb as l,ga as p,nb as g,ob as h,ta as s}from"./chunk-RAOXHQSQ.js";import{i as r}from"./chunk-SLIYHYWC.js";var V=(()=>{let n=class n{inputId=s.required();items=s([]);channels;selectedId;ngOnChanges(){this.channels=this.items().map(e=>{let i=e.avatarPath?e.avatarPath:O.GET_DEFAULT_AVATAR_URL(21);return Object.assign({},e,{imageUrl:i})})}propagateChange=e=>{};writeValue(e){this.selectedId=typeof e=="string"?parseInt(e,10):e}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId)}getSelectedChannel(){return(this.channels||[]).find(e=>e.id+""==this.selectedId+"")}};r(n,"\u0275fac",function(i){return new(i||n)}),r(n,"\u0275cmp",m({type:n,selectors:[["my-select-channel"]],inputs:{inputId:[1,"inputId"],items:[1,"items"]},features:[_([{provide:I,useExisting:d(()=>n),multi:!0}]),p],decls:1,vars:4,consts:[[3,"ngModelChange","inputId","items","ngModel","filter"]],template:function(i,t){i&1&&(g(0,"my-select-options",0),f("ngModelChange",function(a){return C(t.selectedId,a)||(t.selectedId=a),a}),u("ngModelChange",function(){return t.onModelChange()}),h()),i&2&&(l("inputId",t.inputId())("items",t.channels),c("ngModel",t.selectedId),l("filter",t.channels&&t.channels.length>5))},dependencies:[v,M,S,y,T],encapsulation:2}));let o=n;return o})();export{V as a};
/**i18n:aa38438cfc6bb6877c9985433629bf5f310ba8cfd6183982ad2c0c8f601d3935*/
//# sourceMappingURL=chunk-NAS62U6O.js.map
