import{Ab as F,I as h,vb as p,xb as S}from"./chunk-YSQLW2JA.js";import{Aa as l,Ag as f,u as c,ya as a,zc as d}from"./chunk-SKPDQO4E.js";var u=`<div class="w-100">\r
  <armon-select #select [multiselect]="multiselect" [hideChips]="hideChips" [notStoreSelection]="notStoreSelection"\r
    [minSearchLength]="0" uniqueField="id" descriptionField="description" moreInfoField="moreInfo" responseField="items"\r
    [searchFunction]="searchVisitor" (itemSelected)="onItemSelected($event)"\r
    (itemRemoved)="onItemRemoved($event)"></armon-select>\r
</div>`;var v=`:host label{font-weight:initial}
`;var N=function(s,i,e,t){var o=arguments.length,r=o<3?i:t===null?t=Object.getOwnPropertyDescriptor(i,e):t,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,i,e,t);else for(var m=s.length-1;m>=0;m--)(n=s[m])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r},_=class extends S{visitorService;dynamicFormService;fieldName;isProfileField;endPoint;constructor(i,e){super(),this.visitorService=i,this.dynamicFormService=e,this.searchVisitor=this.searchVisitor.bind(this)}ngOnInit(){}searchVisitor(i){if(this.endPoint)return this.dynamicFormService.requestForGenericSearch(this.endPoint,i).pipe(c(e=>(e.items.forEach(t=>{t.data={fieldName:this.fieldName,isProfileField:this.isProfileField}}),e)));{let e=new f;return e.filter=i,e.fieldName=this.fieldName,e.skip=0,e.take=d.REQUEST_ITEM_LIMIT,this.visitorService.searchField(e,this.isProfileField).pipe(c(t=>(t.items.forEach(o=>{o.data={fieldName:this.fieldName,isProfileField:this.isProfileField}}),t)))}}getFieldName(){return this.fieldName}getIsProfileField(){return this.isProfileField}static ctorParameters=()=>[{type:p},{type:h}];static propDecorators={fieldName:[{type:l}],isProfileField:[{type:l}],endPoint:[{type:l}]}};_=N([a({selector:"armon-visitor-field-search",template:u,standalone:!0,imports:[F],styles:[v]})],_);export{_ as a};
