/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { getColorModeStyles } from "../utils/getColorModeStyles.js";
import { DARK_COLOR_MODE_CLASSNAME, LIGHT_COLOR_MODE_CLASSNAME } from "../packages/css-tokens/dist/index.js";
import { DEFAULT_COLOR_MODE } from "../packages/modes/dist/index.js";
import { isString } from "lodash-es";
//#region ../tailwind-internal/dist/base/addColorModeVars.js
/*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
function addColorModeVars(tokens, { addBase, config }) {
	const styles = getColorModeStyles(tokens);
	const parentConfigImportant = config().important;
	addBase({
		[isString(parentConfigImportant) ? parentConfigImportant : ":root"]: styles[DEFAULT_COLOR_MODE],
		[`.${LIGHT_COLOR_MODE_CLASSNAME}`]: styles.light,
		[`.${DARK_COLOR_MODE_CLASSNAME}`]: styles.dark
	});
}
//#endregion
export { addColorModeVars };
