import{a as D,b as E}from"./chunk-3IJB6NNK.js";import{b as A}from"./chunk-GXA3YMKZ.js";import{E as b,a as _,g as w,o as N}from"./chunk-7JTNILXC.js";import{Ec as s,Hb as h,Jc as i,Mc as v,Na as m,Vb as f,Y as p,ah as S,cc as C,dc as I,ec as M,kc as y,mb as u,nb as g,ob as c}from"./chunk-NY4TI4KT.js";import{i as r}from"./chunk-IQVXR75E.js";var R=(()=>{let e=class e{inputId=s.required();small=s(!1,{transform:v});selectedItems=i([]);placeholder=i("\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0442\u0435\u0433");separator;ngOnInit(){A()&&(this.separator=",",this.placeholder.set("\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0437\u0430\u043F\u044F\u0442\u0443\u044E (,) \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0442\u0435\u0433\u0430"));}propagateChange=a=>{};writeValue(a){this.selectedItems.set(a);}registerOnChange(a){this.propagateChange=a;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedItems());}};r(e,"\u0275fac",function(l){return new(l||e)();}),r(e,"\u0275cmp",m({type:e,selectors:[["my-select-tags"]],inputs:{inputId:[1,"inputId"],small:[1,"small"],selectedItems:[1,"selectedItems"],placeholder:[1,"placeholder"]},outputs:{selectedItems:"selectedItemsChange",placeholder:"placeholderChange"},features:[y([{provide:_,useExisting:p(()=>e),multi:!0}])],decls:1,vars:7,consts:[["multiple","true",1,"w-100",3,"ngModelChange","ngModel","placeholder","inputId","separator","typeahead"]],template:function(l,t){l&1&&(g(0,"p-autoComplete",0),M("ngModelChange",function(n){return I(t.selectedItems,n)||(t.selectedItems=n),n;}),h("ngModelChange",function(){return t.onModelChange();}),c()),l&2&&(f("small",t.small()),C("ngModel",t.selectedItems),u("placeholder",t.placeholder())("inputId",t.inputId())("separator",t.separator)("typeahead",!1));},dependencies:[E,D,b,w,N],encapsulation:2}));let o=e;return o;})();var j=o=>{if(!o.value)return null;let e=S(o.value);return e.every(d=>e.indexOf(d)===e.lastIndexOf(d))?null:{unique:{reason:"invalid"}};};export{R as a,j as b};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-AQEMCWZ4.js.map