import{a as D,b as E}from"./chunk-Z6HFTXVJ.js";import{b as A}from"./chunk-LDRLMHKS.js";import{E as w,a as _,g as N,o as b}from"./chunk-GE7DWA6O.js";import{Dc as s,Gb as h,Ic as i,Lc as v,Na as m,Ub as f,Y as p,_g as S,bc as C,cc as I,dc as M,jc as y,lb as u,mb as g,nb as c}from"./chunk-MOXUT4EU.js";import{i as r}from"./chunk-QQ7SJNXU.js";var R=(()=>{let e=class e{inputId=s.required();small=s(!1,{transform:v});selectedItems=i([]);placeholder=i("\u0648\u0627\u0631\u062F \u0646\u0645\u0648\u062F\u0646 \u06CC\u06A9 \u0628\u0631\u0686\u0633\u0628 \u062C\u062F\u06CC\u062F");separator;ngOnInit(){A()&&(this.separator=",",this.placeholder.set("Use a comma (,) to add a tag"));}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",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,w,N,b],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:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-PFTJRGLC.js.map