Liferay.Loader.define("dynamic-data-mapping-form-field-type@6.0.147/Validation/DDMQuantity",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$react","../util/numericalOperations"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r("@frontend-taglib-clay$clayui/form"),n=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=a?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),i=r("../util/numericalOperations");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}const e=999,l=1;var _default=({label:t,name:r,onQuantityChange:u,readOnly:o,value:c})=>{const[f,d]=(0,n.useState)(c.toString());return(0,n.useEffect)((()=>{d(c.toString())}),[c]),n.default.createElement("label",null,t,n.default.createElement(a.ClayInput,{disabled:o,max:e,min:l,name:r,onBlur:({target:t})=>{const r=(0,i.limitValue)({defaultValue:l,max:e,min:l,value:parseInt(t.value,10)});d(r.toString()),u(r)},onChange:({target:{value:e}})=>{d(e)},onKeyPress:e=>{/[-.+,]/.test(e.key)&&e.preventDefault()},type:"number",value:f}))};t.default=_default}}));
//# sourceMappingURL=DDMQuantity.js.map