import{A as T}from"./chunk-LLCJTE6I.js";import{a as O}from"./chunk-SMO6IFQB.js";import{C as v,a as I,g as M,n as S}from"./chunk-MJIAB7QL.js";import{Ab as u,Qc as y,Ra as m,Tb as c,Ub as C,Vb as f,X as d,Zb as _,db as l,fa as p,mb as g,nb as h,sa as s}from"./chunk-2GYONVCW.js";import{i as r}from"./chunk-6PUAHDUH.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:7c691147a9ded88b46d9cd2285c6afa220006ce26eb0d02eb4522192723b6cd8*/
//# sourceMappingURL=chunk-4R24HUVB.js.map
