import{A as O,B as T}from"./chunk-GABZVP3T.js";import{a as w}from"./chunk-WUOPDINA.js";import{A as v,a as y,g as I,l as S}from"./chunk-ZIVZTBTN.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-OX24XL2F.js";import{i as a}from"./chunk-FQ4ILEWG.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:93ef1b86561141301263c1f349fa8abb749523958c3a6dfaf46ed36d22b0a506*/
//# sourceMappingURL=chunk-7CLFMZBJ.js.map
