import{A as q}from"./chunk-NNGPXXI4.js";import{a as U}from"./chunk-WO4ED4IM.js";import{b as F}from"./chunk-WPBWOUWA.js";import{C as L,a as b,d as g,g as v,n as D}from"./chunk-NQFIF6FB.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-W6R7I2TH.js";import{i as r}from"./chunk-PTJGHD3V.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:"\u30C1\u30E3\u30F3\u30CD\u30EB\u306F\u5FC5\u9808\u3067\u3059\u3002"}},ie={VALIDATORS:[g.required,z],MESSAGES:{required:"\u30E6\u30FC\u30B6\u30FC\u540D\u306F\u5FC5\u9808\u3067\u3059\u3002",localAccountOnly:"\u6240\u6709\u6A29\u306F\u30ED\u30FC\u30AB\u30EB\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u306E\u307F\u8EE2\u9001\u3067\u304D\u307E\u3059"}};function z(e){return e.value.includes("@")?{localAccountOnly:!0}:null;}export{ne as a,ie as b,X as c};/**i18n:90f1dd82a779b57eddc91ef20913c88eecaa9632bba8ac04ad50f47ae2b82df7*///# sourceMappingURL=chunk-HVHJZZBS.js.map