/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { DEFAULT_SCALE_MODE } from "../modes/dist/index.js";
import { createContext, useContext } from "react";
import { jsx } from "react/jsx-runtime";

//#region src/providers/ScaleModeProvider.tsx
const ScaleModeContext = createContext(DEFAULT_SCALE_MODE);
function useScaleMode() {
	const context = useContext(ScaleModeContext);
	if (!context) return DEFAULT_SCALE_MODE;
	return context;
}
function ScaleModeProvider({ value, children }) {
	const scaleMode = useScaleMode();
	return /* @__PURE__ */ jsx(ScaleModeContext.Provider, {
		value: value ?? scaleMode,
		children
	});
}
ScaleModeProvider.displayName = "ScaleModeProvider";

//#endregion
export { ScaleModeContext, ScaleModeProvider, useScaleMode };