import{A as w,B as O}from"./chunk-5246EKZF.js";import{a as v}from"./chunk-MOA5OONJ.js";import{A as S,a as I,g as M,l as y}from"./chunk-I267ADJP.js";import{$a as s,Gc as _,La as p,Mb as u,Nb as c,Ob as C,Pb as f,Y as l,ha as d,ib as m,jb as g,wb as h}from"./chunk-4JM6MIZ5.js";import{i as r}from"./chunk-QJQRWPYR.js";var W=(()=>{let n=class n{inputId;items=[];channels;selectedId;ngOnChanges(){this.channels=this.items.map(e=>{let o=e.avatarPath?e.avatarPath:v.GET_DEFAULT_AVATAR_URL(21);return Object.assign({},e,{imageUrl:o})})}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(o){return new(o||n)}),r(n,"\u0275cmp",p({type:n,selectors:[["my-select-channel"]],inputs:{inputId:"inputId",items:"items"},features:[f([{provide:I,useExisting:l(()=>n),multi:!0}]),d],decls:1,vars:4,consts:[[3,"ngModelChange","inputId","items","ngModel","filter"]],template:function(o,t){o&1&&(m(0,"my-select-options",0),C("ngModelChange",function(a){return c(t.selectedId,a)||(t.selectedId=a),a}),h("ngModelChange",function(){return t.onModelChange()}),g()),o&2&&(s("inputId",t.inputId)("items",t.channels),u("ngModel",t.selectedId),s("filter",t.channels&&t.channels.length>5))},dependencies:[w,S,M,y,_,O],encapsulation:2}));let i=n;return i})();export{W as a};
/**i18n:68865f44f2a527c44cf5136a17c76a0ff8308c2bae5c7c8d50070a5fb9847c44*/
//# sourceMappingURL=chunk-6WYF35FU.js.map
