/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
import { DARK_COLOR_MODE_CLASSNAME, LIGHT_COLOR_MODE_CLASSNAME } from "../../css-tokens/dist/index.js";
import { DEFAULT_COLOR_MODE } from "../../modes/dist/index.js";
import { getColorModeStyles } from "../utils/getColorModeStyles.js";
import { isString } from "lodash-es";

//#region src/tailwind/base/addColorModeVars.ts
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 };
//# sourceMappingURL=addColorModeVars.js.map