import{A as T}from"./chunk-IK2OAM6A.js";import{a as O}from"./chunk-ZOFAT6TJ.js";import{C as v,a as I,g as M,n as S}from"./chunk-2BCM34HS.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-PXFCSR5K.js";import{i as r}from"./chunk-DOSG2ZAB.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:c65a26d1e9dd8b923403d49a4dccad76e3fa3313ede414d8a3b16d3f73c99bce*/
//# sourceMappingURL=chunk-M36QCY56.js.map
