import{A as O,B as T}from"./chunk-B56VQOIF.js";import{a as w}from"./chunk-GHQGRKEZ.js";import{A as v,a as y,g as I,l as S}from"./chunk-HZMHCW3T.js";import{Db as u,Qc as M,Sa as m,Wb as c,Xb as C,Y as d,Yb as f,Zb as _,ga as p,gb as l,pb as g,qb as h,ta as s}from"./chunk-XD25PYOU.js";import{i as a}from"./chunk-FPVLB6PA.js";var W=(()=>{let n=class n{inputId=s.required();items=s([]);channels;selectedId;ngOnChanges(){this.channels=this.items().map(e=>{let o=e.avatarPath?e.avatarPath:w.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+"")}};a(n,"\u0275fac",function(o){return new(o||n)}),a(n,"\u0275cmp",m({type:n,selectors:[["my-select-channel"]],inputs:{inputId:[1,"inputId"],items:[1,"items"]},features:[_([{provide:y,useExisting:d(()=>n),multi:!0}]),p],decls:1,vars:4,consts:[[3,"ngModelChange","inputId","items","ngModel","filter"]],template:function(o,t){o&1&&(g(0,"my-select-options",0),f("ngModelChange",function(r){return C(t.selectedId,r)||(t.selectedId=r),r}),u("ngModelChange",function(){return t.onModelChange()}),h()),o&2&&(l("inputId",t.inputId())("items",t.channels),c("ngModel",t.selectedId),l("filter",t.channels&&t.channels.length>5))},dependencies:[O,v,I,S,M,T],encapsulation:2}));let i=n;return i})();export{W as a};
/**i18n:fc817608a00477e18624cf8be5badc6c9afae12f0946c7c1548c95cf79bd0e7b*/
//# sourceMappingURL=chunk-X5SFASMS.js.map
