"use client";
import { useEnvironmentContext } from "../../providers/environment/use-environment-context.js";
import { useLocaleContext } from "../../providers/locale/use-locale-context.js";
import * as progress from "@zag-js/progress";
import { useId } from "react";
import { normalizeProps, useMachine } from "@zag-js/react";
//#region src/components/progress/use-progress.ts
var useProgress = (props) => {
	const id = useId();
	const { getRootNode } = useEnvironmentContext();
	const { dir, locale } = useLocaleContext();
	const machineProps = {
		id,
		dir,
		locale,
		getRootNode,
		...props
	};
	const service = useMachine(progress.machine, machineProps);
	return progress.connect(service, normalizeProps);
};
//#endregion
export { useProgress };
