import{s as E,v as u,w as v,f as b,c3 as W,z as c,P as j,Q as d,a1 as A}from"./index-BPRWoLf4.js";var Q=function(o){E(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.formulaRef=function(e){if(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.ref=e}else this.ref=void 0},a.prototype.validate=function(){var e,t=this.props,s=t.translate,l=t.value;if(!((e=this.ref)===null||e===void 0)&&e.validate&&l){var r=this.ref.validate(l);if(r!==!0)return s("FormulaEditor.invalidData",{err:r})}},a.prototype.render=function(){var e=this.props;e.selectedOptions;var t=e.disabled,s=e.onChange,l=e.evalMode,r=e.mixedMode,m=e.variableMode,f=e.header,h=e.label,M=e.value,g=e.clearable,C=e.className;e.style,e.classPrefix,e.classnames,e.allowInput;var N=e.borderMode,_=e.placeholder,y=e.inputMode,I=e.btnLabel,P=e.level,F=e.btnSize,O=e.icon,x=e.title,R=e.variableClassName,S=e.functionClassName,w=e.data,V=e.onPickerOpen,k=e.selfVariableName;e.popOverContainer;var z=e.env,L=e.inputSettings,U=e.mobileUI,p=this.props,i=p.variables,n=p.functions;return u(i)&&(i=v(i,this.props.data,"| raw")),u(n)&&(n=v(n,this.props.data,"| raw")),b.createElement(W,{popOverContainer:z.getModalContainer,ref:this.formulaRef,className:C,value:M,disabled:t,onChange:s,evalMode:l,variables:i,variableMode:m,functions:n,header:f||h||"",borderMode:N,placeholder:_,mode:y,inputSettings:L,btnLabel:I,level:P,btnSize:F,icon:O,title:x,clearable:g,variableClassName:R,functionClassName:S,data:w,onPickerOpen:V,selfVariableName:k,mixedMode:r,mobileUI:U})},a.defaultProps={inputMode:"input-button",borderMode:"full",evalMode:!0},c([j,d("design:type",Function),d("design:paramtypes",[Object]),d("design:returntype",void 0)],a.prototype,"formulaRef",null),a=c([A({type:"input-formula"})],a),a}(b.Component);export{Q as InputFormulaRenderer};
