import{A as O,B as T}from"./chunk-SLZ3C4PO.js";import{a as w}from"./chunk-5QNRJ25A.js";import{A as v,a as M,g as y,l as S}from"./chunk-7VHQBARM.js";import{Fc as I,Hb as u,Ib as c,Jb as C,Kb as f,Lb as _,Wa as s,X as l,ba as d,db as m,eb as g,ka as p,rb as h}from"./chunk-QXV2GR6R.js";import{i as n}from"./chunk-JJ4RDTEF.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:224bcada6943fe8b17ea60808c2d370cec9507c3bd670ebe71692d099a3befa1*/
//# sourceMappingURL=chunk-DFPQCGRT.js.map
