import{A as T}from"./chunk-CCFVCFEE.js";import{a as O}from"./chunk-4JRZISSH.js";import{C as v,a as I,g as M,n as S}from"./chunk-PPHXRTFX.js";import{$b as _,Bb as u,Sa as m,Tc as y,Vb as c,Wb as C,X as d,Xb as f,eb as l,ga as p,nb as g,ob as h,ta as s}from"./chunk-747XQIKV.js";import{i as r}from"./chunk-D3F7ONO7.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:6f27118bd781e1b187bee9d5d6ca55c8b3017949bcb9fb3e18a73e038f249d42*/
//# sourceMappingURL=chunk-IWROSVKA.js.map
