"use client";
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
const require_use_environment_context = require("../../providers/environment/use-environment-context.cjs");
const require_use_locale_context = require("../../providers/locale/use-locale-context.cjs");
const require_use_field_context = require("../field/use-field-context.cjs");
let _zag_js_number_input = require("@zag-js/number-input");
_zag_js_number_input = require_runtime.__toESM(_zag_js_number_input, 1);
let react = require("react");
let _zag_js_react = require("@zag-js/react");
//#region src/components/number-input/use-number-input.ts
var useNumberInput = (props) => {
	const id = (0, react.useId)();
	const { getRootNode } = require_use_environment_context.useEnvironmentContext();
	const { dir, locale } = require_use_locale_context.useLocaleContext();
	const field = require_use_field_context.useFieldContext();
	const machineProps = {
		id,
		ids: {
			label: field?.ids.label,
			input: field?.ids.control
		},
		disabled: field?.disabled,
		readOnly: field?.readOnly,
		required: field?.required,
		invalid: field?.invalid,
		dir,
		locale,
		getRootNode,
		...props
	};
	const service = (0, _zag_js_react.useMachine)(_zag_js_number_input.machine, machineProps);
	return _zag_js_number_input.connect(service, _zag_js_react.normalizeProps);
};
//#endregion
exports.useNumberInput = useNumberInput;
