require("../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_token = require("../theme/token.js");
let react = require("react");
//#region src/plus/productSelect/hooks/useToken.ts
function useToken(customToken) {
	return (0, react.useMemo)(() => {
		return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, require_token.defaultToken), {}), customToken || {});
	}, [customToken]);
}
function genCSSVars(token) {
	const cssVars = {};
	Object.entries(token).forEach(([key, value]) => {
		const cssKey = `--ps-${key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)}`;
		cssVars[cssKey] = value;
	});
	return cssVars;
}
//#endregion
exports.genCSSVars = genCSSVars;
exports.useToken = useToken;
