Liferay.Loader.define("segments-web@3.0.68/js/components/inputs/DecimalInput.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,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a("@frontend-taglib-clay$clayui/form"),l=(r(a("liferay!frontend-js-react-web$prop-types")),r(a("liferay!frontend-js-react-web$react")));function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class e extends l.default.Component{constructor(...e){super(...e),i(this,"_handleDecimalBlur",(e=>{const t=Number.parseFloat(e.target.value).toFixed(2);this.props.onChange({value:t})})),i(this,"_handleDecimalChange",(e=>{this.props.onChange({value:e.target.value})}))}render(){const{disabled:e,options:t,value:a}=this.props;return t.length?l.default.createElement(n.ClaySelectWithOption,{className:"criterion-input form-control","data-testid":"options-decimal",disabled:e,onChange:this._handleDecimalChange,options:t.map((e=>({disabled:e.disabled,label:e.label,value:e.value}))),value:a}):l.default.createElement("input",{className:"criterion-input form-control","data-testid":"decimal-number",disabled:e,onBlur:this._handleDecimalBlur,onChange:this._handleDecimalChange,step:"0.01",type:"number",value:a})}}i(e,"defaultProps",{options:[]});var o=e;t.default=o}}));
//# sourceMappingURL=DecimalInput.es.js.map