import{A as T}from"./chunk-VDLGCIJ4.js";import{a as O}from"./chunk-YGIKG7MC.js";import{C as v,a as I,g as M,n as S}from"./chunk-B5LZ35ZT.js";import{Ab as u,Nc as y,Ra as m,Tb as c,Ub as C,Vb as f,Wb as _,X as d,db as l,fa as p,mb as g,nb as h,sa as s}from"./chunk-WHTWCQ62.js";import{i as r}from"./chunk-AI7IVZV2.js";var V=(()=>{let n=class n{inputId=s.required();items=s([]);channels;selectedId;ngOnChanges(){this.channels=this.items().map(e=>{let i=e.avatarPath?e.avatarPath:O.GET_DEFAULT_AVATAR_URL(21);return Object.assign({},e,{imageUrl:i})})}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(i){return new(i||n)}),r(n,"\u0275cmp",m({type:n,selectors:[["my-select-channel"]],inputs:{inputId:[1,"inputId"],items:[1,"items"]},features:[_([{provide:I,useExisting:d(()=>n),multi:!0}]),p],decls:1,vars:4,consts:[[3,"ngModelChange","inputId","items","ngModel","filter"]],template:function(i,t){i&1&&(g(0,"my-select-options",0),f("ngModelChange",function(a){return C(t.selectedId,a)||(t.selectedId=a),a}),u("ngModelChange",function(){return t.onModelChange()}),h()),i&2&&(l("inputId",t.inputId())("items",t.channels),c("ngModel",t.selectedId),l("filter",t.channels&&t.channels.length>5))},dependencies:[v,M,S,y,T],encapsulation:2}));let o=n;return o})();export{V as a};
/**i18n:1cf7c077143c4c267fdafbe5508f191afcef21bad6aba22a3a8dc180e1003753*/
//# sourceMappingURL=chunk-EFBHXRDR.js.map
