"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InputNumber = void 0;
const tslib_1 = require("tslib");
const classnames_1 = tslib_1.__importDefault(require("classnames"));
const rc_input_number_1 = tslib_1.__importDefault(require("rc-input-number"));
const react_1 = tslib_1.__importDefault(require("react"));
require("./input.less");
require("./input-number.less");
const prefix = 'kt-input-number';
const InputNumber = (props) => {
    const { value, size = 'default', wrapperStyle, className, disabled, min, max, onChange, ...restProps } = props;
    const onRcChange = (val) => {
        if (onChange) {
            onChange(val);
        }
    };
    const inputClx = (0, classnames_1.default)('kt-input', 'kt-input-number', className, {
        [`kt-input-${size}`]: size,
        ['kt-input-disabled']: disabled,
    });
    return (react_1.default.createElement("div", { className: inputClx, style: wrapperStyle },
        react_1.default.createElement("div", { className: 'kt-input-box' },
            react_1.default.createElement(rc_input_number_1.default, { prefixCls: prefix, min: min, max: max, value: value, type: 'number', onChange: onRcChange, controls: true, ...restProps }))));
};
exports.InputNumber = InputNumber;
exports.InputNumber.displayName = 'OpenSumiInputNumber';
//# sourceMappingURL=InputNumber.js.map