import{h as U}from"./chunk-NHQYZPBX.js";import{a as F}from"./chunk-UDO6XVZF.js";import{b as L}from"./chunk-ZDA6S5XE.js";import{D,a as R,d as u,g as b,n as v}from"./chunk-ZPYT6WL3.js";import{$b as N,Cb as E,Eb as T,Ka as f,Qa as S,X as _,Zb as M,_b as O,bb as s,cb as c,fa as g,fc as V,ga as C,hb as p,ib as y,jb as A,kb as d,qa as h,sc as w,ub as I,yc as m}from"./chunk-6YFOH76E.js";import{i as r}from"./chunk-QQ7SJNXU.js";function H(e,n){e&1&&d(0,"my-collaborator-state",2);}function W(e,n){e&1&&d(0,"my-collaborator-state",3);}function x(e,n){if(e&1&&s(0,H,1,0,"my-collaborator-state",2)(1,W,1,0,"my-collaborator-state",3),e&2){let l=T().$implicit;c(l.editor?0:l.owner?1:-1);}}function P(e,n){if(e&1&&s(0,x,2,1),e&2){let l=n.$implicit;c(l.collaborate?0:-1);}}var X=(()=>{let n=class n{inputId=m.required();items=m([]);channels;selectedId;ngOnChanges(){this.channels=this.items().map(t=>{let i=t.avatarFileUrl?t.avatarFileUrl:L.GET_DEFAULT_AVATAR_URL(21);return Object.assign({},t,{imageUrl:i});});}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(i){return new(i||n)();}),r(n,"\u0275cmp",f({type:n,selectors:[["my-select-channel"]],inputs:{inputId:[1,"inputId"],items:[1,"items"]},features:[V([{provide:R,useExisting:_(()=>n),multi:!0}]),h],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(i,o){if(i&1){let q=I();y(0,"my-select-options",1),N("ngModelChange",function(a){return g(q),O(o.selectedId,a)||(o.selectedId=a),C(a);}),E("ngModelChange",function(){return o.onModelChange();}),S(1,P,1,1,"ng-template",null,0,w),A();}i&2&&(p("inputId",o.inputId())("items",o.channels),M("ngModel",o.selectedId),p("filter",o.channels&&o.channels.length>5));},dependencies:[D,b,v,U,F],encapsulation:2}));let e=n;return e;})();var ne={VALIDATORS:[u.required],MESSAGES:{required:"Requ\xEDrese a canle."}},oe={VALIDATORS:[u.required,z],MESSAGES:{required:"O nome de usuaria \xE9 requerido.",localAccountOnly:"S\xF3 podes transferir a propiedade a unha conta local"}};function z(e){return e.value.includes("@")?{localAccountOnly:!0}:null;}export{ne as a,oe as b,X as c};/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-3CKGIT3D.js.map