import{b as P}from"./chunk-RDOIXPFS.js";import{A as D}from"./chunk-ESBU7OHQ.js";import{b as q}from"./chunk-ITB6MN7G.js";import{C as v,a as R,d,g as N,n as L}from"./chunk-AWFGIQSJ.js";import{Cb as I,Rc as w,Sa as C,Wb as E,X as h,Xb as M,Ya as c,Yb as T,ac as O,eb as m,ga as g,ha as l,ia as s,jb as _,ob as f,oc as V,pb as A,qb as S,ta as p,ub as y}from"./chunk-GKQGDBUU.js";import{i as a}from"./chunk-QVFSZZWQ.js";function F(t,n){t&1&&S(0,"my-collaborator-state",2);}function H(t,n){if(t&1&&c(0,F,1,0,"my-collaborator-state",2),t&2){let G=n.$implicit;_(G.editor?0:-1);}}var K=(()=>{let n=class n{inputId=p.required();items=p([]);channels;selectedId;ngOnChanges(){this.channels=this.items().map(e=>{let i=e.avatarPath?e.avatarPath:q.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+"");}};a(n,"\u0275fac",function(i){return new(i||n)();}),a(n,"\u0275cmp",C({type:n,selectors:[["my-select-channel"]],inputs:{inputId:[1,"inputId"],items:[1,"items"]},features:[O([{provide:R,useExisting:h(()=>n),multi:!0}]),g],decls:3,vars:4,consts:[["itemExtra",""],[3,"ngModelChange","inputId","items","ngModel","filter"],["type","accepted","disableTooltip","true",1,"lh-1","ms-2"]],template:function(i,o){if(i&1){let u=y();f(0,"my-select-options",1),T("ngModelChange",function(r){return l(u),M(o.selectedId,r)||(o.selectedId=r),s(r);}),I("ngModelChange",function(){return l(u),s(o.onModelChange());}),c(1,H,1,1,"ng-template",null,0,V),A();}i&2&&(m("inputId",o.inputId())("items",o.channels),E("ngModel",o.selectedId),m("filter",o.channels&&o.channels.length>5));},dependencies:[v,N,L,w,D,P],encapsulation:2}));let t=n;return t;})();var ee={VALIDATORS:[d.required],MESSAGES:{required:"R\xE1sin er nau\xF0synleg."}},te={VALIDATORS:[d.required,U],MESSAGES:{required:"Notandanafni\xF0 er nau\xF0synlegt.",localAccountOnly:"\xDE\xFA getur a\xF0eins millif\xE6rt eignarhald yfir \xE1 st\xF0bundinn a\xF0gang"}};function U(t){return t.value.includes("@")?{localAccountOnly:!0}:null;}export{ee as a,te as b,K as c};/**i18n:42345378061bf3c93df67acfa161b751a7b03cc91f3ede7c1f1cdf2bba62fe26*///# sourceMappingURL=chunk-EZ47K2KV.js.map