import{A as q}from"./chunk-VMPGITBT.js";import{a as U}from"./chunk-V2GKRMU4.js";import{b as F}from"./chunk-4GMKSIW4.js";import{C as L,a as b,d as g,g as v,n as D}from"./chunk-Y4WF5HJS.js";import{$a as d,Bb as M,Ka as S,Qa as y,Wb as O,X as h,Xb as V,Yb as w,_a as p,cc as N,eb as m,fa as s,fb as A,ga as c,gb as I,hb as u,oa as f,qc as R,rb as E,yc as _,zb as T}from"./chunk-R4Z6ZI3L.js";import{i as r}from"./chunk-P6NJDXIL.js";function H(e,n){e&1&&u(0,"my-collaborator-state",2);}function W(e,n){e&1&&u(0,"my-collaborator-state",3);}function x(e,n){if(e&1&&p(0,H,1,0,"my-collaborator-state",2)(1,W,1,0,"my-collaborator-state",3),e&2){let l=M().$implicit;d(l.editor?0:l.owner?1:-1);}}function P(e,n){if(e&1&&p(0,x,2,1),e&2){let l=n.$implicit;d(l.collaborate?0:-1);}}var X=(()=>{let n=class n{inputId=_.required();items=_([]);channels;selectedId;ngOnChanges(){this.channels=this.items().map(t=>{let o=t.avatarFileUrl?t.avatarFileUrl:F.GET_DEFAULT_AVATAR_URL(21);return Object.assign({},t,{imageUrl:o});});}propagateChange=t=>{};writeValue(t){this.selectedId=typeof t=="string"?parseInt(t,10):t;}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId);}getSelectedChannel(){return(this.channels||[]).find(t=>t.id+""==this.selectedId+"");}};r(n,"\u0275fac",function(o){return new(o||n)();}),r(n,"\u0275cmp",S({type:n,selectors:[["my-select-channel"]],inputs:{inputId:[1,"inputId"],items:[1,"items"]},features:[N([{provide:b,useExisting:h(()=>n),multi:!0}]),f],decls:3,vars:4,consts:[["itemExtra",""],[3,"ngModelChange","inputId","items","ngModel","filter"],["type","accepted","disableTooltip","true",1,"lh-1","ms-2"],["type","owner","disableTooltip","true",1,"lh-1","ms-2"]],template:function(o,i){if(o&1){let C=E();A(0,"my-select-options",1),w("ngModelChange",function(a){return s(C),V(i.selectedId,a)||(i.selectedId=a),c(a);}),T("ngModelChange",function(){return s(C),c(i.onModelChange());}),y(1,P,1,1,"ng-template",null,0,R),I();}o&2&&(m("inputId",i.inputId())("items",i.channels),O("ngModel",i.selectedId),m("filter",i.channels&&i.channels.length>5));},dependencies:[L,v,D,q,U],encapsulation:2}));let e=n;return e;})();var ne={VALIDATORS:[g.required],MESSAGES:{required:"A csatorna megad\xE1sa k\xF6telez\u0151."}},ie={VALIDATORS:[g.required,z],MESSAGES:{required:"A felhaszn\xE1l\xF3n\xE9v megad\xE1sa k\xF6telez\u0151.",localAccountOnly:"A tulajdonjogot csak egy helyi fi\xF3kra lehet \xE1truh\xE1zni"}};function z(e){return e.value.includes("@")?{localAccountOnly:!0}:null;}export{ne as a,ie as b,X as c};/**i18n:138e9aba5923606215625ab5641fbdc103d8a34cfe13ae910386f40f27aea675*///# sourceMappingURL=chunk-YSBAN2DD.js.map