import{A as O,B as T}from"./chunk-6VMPDW5I.js";import{a as w}from"./chunk-RKQVCQGG.js";import{A as v,a as M,g as y,l as S}from"./chunk-K34LZIA3.js";import{Ec as I,Gb as u,Hb as c,Ib as C,Jb as f,Kb as _,Va as s,X as l,ba as d,cb as m,db as g,ka as p,qb as h}from"./chunk-X3RCWQ3R.js";import{i as n}from"./chunk-SR6RTMQI.js";var G=(()=>{let o=class o{constructor(){n(this,"inputId");n(this,"items",[]);n(this,"channels");n(this,"selectedId");n(this,"propagateChange",e=>{})}ngOnChanges(){this.channels=this.items.map(e=>{let i=e.avatarPath?e.avatarPath:w.GET_DEFAULT_AVATAR_URL(21);return Object.assign({},e,{imageUrl:i})})}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+"")}};n(o,"\u0275fac",function(i){return new(i||o)}),n(o,"\u0275cmp",d({type:o,selectors:[["my-select-channel"]],inputs:{inputId:"inputId",items:"items"},standalone:!0,features:[f([{provide:M,useExisting:l(()=>o),multi:!0}]),p,_],decls:1,vars:4,consts:[[3,"ngModelChange","inputId","items","ngModel","filter"]],template:function(i,t){i&1&&(m(0,"my-select-options",0),C("ngModelChange",function(r){return c(t.selectedId,r)||(t.selectedId=r),r}),h("ngModelChange",function(){return t.onModelChange()}),g()),i&2&&(s("inputId",t.inputId)("items",t.channels),u("ngModel",t.selectedId),s("filter",t.channels&&t.channels.length>5))},dependencies:[O,v,y,S,I,T],encapsulation:2}));let a=o;return a})();export{G as a};
/**i18n:3d16453f213eb5db982e7e7dd90631843ac5d3f860726a614777c3e9e3f9b57e*/
//# sourceMappingURL=chunk-LTPG5VTI.js.map
