import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import React from "react";
import { InputNumber, Space } from "antd";
import { useControllableValue } from "ahooks";
//#region src/components/input-number-range/index.tsx
const defaultValue = {
	max: 0,
	min: 0
};
const InputNumberRange = (props) => {
	const { minInputNumberProps, maxInputNumberProps, separator = "-" } = props;
	const [state, setState] = useControllableValue(props, { defaultValue });
	return /* @__PURE__ */ React.createElement(Space, null, /* @__PURE__ */ React.createElement(InputNumber, _objectSpread2(_objectSpread2({}, minInputNumberProps), {}, {
		value: state === null || state === void 0 ? void 0 : state.min,
		onChange: (val) => {
			setState(_objectSpread2(_objectSpread2({}, state), {}, { min: val }));
		}
	})), separator, /* @__PURE__ */ React.createElement(InputNumber, _objectSpread2(_objectSpread2({}, maxInputNumberProps), {}, {
		value: state === null || state === void 0 ? void 0 : state.max,
		onChange: (val) => {
			setState(_objectSpread2(_objectSpread2({}, state), {}, { max: val }));
		}
	})));
};
//#endregion
export { InputNumberRange as default };
