import{A as q}from"./chunk-2IRTPWMX.js";import{a as U}from"./chunk-JJH44JYD.js";import{b as F}from"./chunk-YK7MMEVX.js";import{C as L,a as b,d as g,g as v,n as D}from"./chunk-JDOQXT4C.js";import{Bb as T,Db as M,La as S,Ra as y,X as h,Yb as O,Zb as V,_b as w,ab as p,bb as d,ec as N,fa as s,ga as c,gb as m,hb as A,ib as I,jb as u,ra as f,sc as R,tb as E,xc as _}from"./chunk-DWEAL4OJ.js";import{i as r}from"./chunk-YM6OINSR.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:"Tiu \u0109i kanalo necesas."}},ie={VALIDATORS:[g.required,z],MESSAGES:{required:"La salutonmo necesas.",localAccountOnly:"Vi povas transdoni posedon nur al loka konto"}};function z(e){return e.value.includes("@")?{localAccountOnly:!0}:null;}export{ne as a,ie as b,X as c};/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-B3OKJCD5.js.map