import{s as oe,ah as te,aF as ae,f as y,cE as le,bJ as R,y as S,ay as ne,aM as ie,O as re,z as T,P as se,Q as p,aX as de,bk as ue}from"./index-DT8qTvyx.js";import{BaseTransferRenderer as pe}from"./Transfer-SIsRyHCh.js";var he=function(f){oe(n,f);function n(){return f!==null&&f.apply(this,arguments)||this}return n.prototype.dispatchEvent=function(d){var a=this.props,e=a.dispatchEvent,r=a.value;e(d,te(this.props,{value:r}))},n.prototype.doAction=function(d){var a,e,r,s=this.props,g=s.resetValue,i=s.onChange,v=s.formStore,c=s.store,m=s.name;switch(d.actionType){case"clear":i==null||i("");break;case"reset":i==null||i((r=(e=ae((a=v==null?void 0:v.pristine)!==null&&a!==void 0?a:c==null?void 0:c.pristine,m))!==null&&e!==void 0?e:g)!==null&&r!==void 0?r:"");break}},n.prototype.render=function(){var d=this,a,e=this.props,r=e.className;e.style;var s=e.classnames,g=e.selectedOptions,i=e.sortable,v=e.loading,c=e.searchable,m=e.searchResultMode,x=e.showArrow,I=e.deferLoad,N=e.disabled,A=e.selectTitle,V=e.resultTitle,B=e.pickerSize,D=e.columns,z=e.leftMode,h=e.selectMode,H=e.borderMode,_=e.itemHeight,L=e.virtualThreshold,U=e.loadingConfig,O=e.labelField,$=O===void 0?"label":O,M=e.valueField,J=M===void 0?"value":M,P=e.deferField,Q=P===void 0?"defer":P,X=e.menuTpl,j=e.valueTpl,q=e.mobileUI,u=e.env,G=e.maxTagCount,K=e.overflowTagPopover,o=e.pagination,t=e.formItem,W=e.data,b=e.popOverContainer,Y=e.placeholder,k=e.autoCheckChildren,Z=k===void 0?!0:k,F=e.initiallyOpen,ee=F===void 0?!0:F,C=this.props,l=C.options,E=C.leftOptions,w=C.leftDefaultValue;return h==="associated"&&l&&l.length&&l[0].leftOptions&&Array.isArray(l[0].children)&&(E=l[0].leftOptions,w=(a=l[0].leftDefaultValue)!==null&&a!==void 0?a:w,l=l[0].children),y.createElement("div",{className:s("TransferControl",r)},y.createElement(le,{placeholder:Y,borderMode:H,selectMode:h,value:g,disabled:N,options:l,onChange:this.handleChange,option2value:this.option2value,sortable:i,searchResultMode:m,onSearch:c?this.handleSearch:void 0,showArrow:x,onDeferLoad:I,selectTitle:A,resultTitle:V,size:B,columns:D,leftMode:z,leftOptions:E,optionItemRender:X?this.optionItemRender:void 0,resultItemRender:j?this.resultItemRender:void 0,onFocus:function(){return d.dispatchEvent("focus")},onBlur:function(){return d.dispatchEvent("blur")},labelField:$,valueField:J,deferField:Q,itemHeight:R(_)>0?R(_):void 0,virtualThreshold:L,mobileUI:q,popOverContainer:u==null?void 0:u.getModalContainer,maxTagCount:G,overflowTagPopover:K,pagination:S(S({},ne(o,["layout","perPageAvailable","popOverContainerSelector"])),{className:o==null?void 0:o.className,enable:(o&&o.enable!==void 0?!!(typeof o.enable=="string"?ie(o.enable,W):o.enable):!!(t!=null&&t.enableSourcePagination))&&(!h||h==="list"||h==="table")&&l.length>0,maxButtons:Number.isInteger(o==null?void 0:o.maxButtons)?o==null?void 0:o.maxButtons:5,page:t==null?void 0:t.sourcePageNum,perPage:t==null?void 0:t.sourcePerPageNum,total:t==null?void 0:t.sourceTotalNum,popOverContainer:b??(u==null?void 0:u.getModalContainer)}),onPageChange:this.handlePageChange,autoCheckChildren:Z,initiallyOpen:ee}),y.createElement(re,{loadingConfig:U,overlay:!0,key:"info",show:v}))},T([se,p("design:type",Function),p("design:paramtypes",[String]),p("design:returntype",void 0)],n.prototype,"dispatchEvent",null),T([de(),p("design:type",Function),p("design:paramtypes",[]),p("design:returntype",void 0)],n.prototype,"render",null),n=T([ue({type:"transfer-picker"})],n),n}(pe);export{he as TransferPickerRenderer};
