Liferay.Loader.define("segments-web@3.0.77/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 r=n("@frontend-taglib-clay$clayui/form"),a=(_interopRequireDefault(n("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(n("liferay!frontend-js-react-web$react")));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class IntegerInput extends a.default.Component{constructor(...e){super(...e),_defineProperty(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?a.default.createElement(r.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}):a.default.createElement("input",{className:"criterion-input form-control","data-testid":"integer-number",disabled:e,onChange:this._handleIntegerChange,type:"number",value:n})}}_defineProperty(IntegerInput,"defaultProps",{options:[]});var o=IntegerInput;t.default=o}}));
//# sourceMappingURL=IntegerInput.es.js.map