import { theme } from "antd";
//#region ../materials/src/hooks/useThemeTokens.ts
const themeTokenCache = /* @__PURE__ */ new Map();
const useThemeTokens = (themeInput) => {
	var _themeInput$token;
	const { useToken, getDesignToken } = theme;
	const { token: antdToken } = useToken();
	const overrideColorPrimary = (themeInput === null || themeInput === void 0 || (_themeInput$token = themeInput.token) === null || _themeInput$token === void 0 ? void 0 : _themeInput$token.colorPrimary) || antdToken.colorPrimary;
	const cached = themeTokenCache.get(overrideColorPrimary);
	if (cached) return cached;
	const computed = getDesignToken({ token: { colorPrimary: overrideColorPrimary } });
	themeTokenCache.set(overrideColorPrimary, computed);
	return computed;
};
//#endregion
export { useThemeTokens as default };
