Liferay.Loader.define("segments-web@3.0.68/js/components/inputs/IntegerInput.es",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("@frontend-taglib-clay$clayui/form"),r=(o(n("liferay!frontend-js-react-web$prop-types")),o(n("liferay!frontend-js-react-web$react")));function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class e extends r.default.Component{constructor(...e){super(...e),l(this,"_handleIntegerChange",(e=>{const t=parseInt(e.target.value,10);isNaN(t)||this.props.onChange({value:t.toString()})}))}render(){const{disabled:e,options:t,value:n}=this.props;return t.length?r.default.createElement(a.ClaySelectWithOption,{className:"criterion-input form-control","data-testid":"options-integer",disabled:e,onChange:this._handleIntegerChange,options:t.map((e=>({disabled:e.disabled,label:e.label,value:e.value}))),value:n}):r.default.createElement("input",{className:"criterion-input form-control","data-testid":"integer-number",disabled:e,onChange:this._handleIntegerChange,type:"number",value:n})}}l(e,"defaultProps",{options:[]});var i=e;t.default=i}}));
//# sourceMappingURL=IntegerInput.es.js.map