/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
require("../../../_virtual/_rolldown/runtime.cjs");
const require_getColorModeStyles = require("../utils/getColorModeStyles.cjs");
const require_index = require("../packages/css-tokens/dist/index.cjs");
const require_index$1 = require("../packages/modes/dist/index.cjs");
let lodash_es = require("lodash-es");
//#region ../tailwind-internal/dist/base/addColorModeVarsV2.js
/*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
function addColorModeVarsV2(tokens, { addBase, config }) {
	const parentConfigImportant = config().important;
	const rootSelector = (0, lodash_es.isString)(parentConfigImportant) ? parentConfigImportant : ":root";
	const styles = require_getColorModeStyles.getColorModeStyles(tokens);
	const stylesWithInvert = (key) => {
		const { colorScheme: _, ...stylesDefault } = styles[key];
		const { colorScheme: __, ...stylesInvert } = styles[key === "light" ? "dark" : "light"];
		return {
			...stylesDefault,
			[`.${require_index.INVERT_COLOR_MODE_CLASSNAME}`]: stylesInvert
		};
	};
	const lightWithInvert = stylesWithInvert("light");
	const darkWithInvert = stylesWithInvert("dark");
	addBase({
		[rootSelector]: {
			colorScheme: require_index$1.DEFAULT_COLOR_MODE,
			...stylesWithInvert(require_index$1.DEFAULT_COLOR_MODE)
		},
		[`.${require_index.SYSTEM_COLOR_MODE_CLASSNAME}`]: {
			colorScheme: "light dark",
			"@media (prefers-color-scheme: dark)": darkWithInvert
		},
		[`.${require_index.LIGHT_COLOR_MODE_CLASSNAME}`]: {
			colorScheme: "light",
			...lightWithInvert
		},
		[`.${require_index.DARK_COLOR_MODE_CLASSNAME}`]: {
			colorScheme: "dark",
			...darkWithInvert
		}
	});
}
//#endregion
exports.addColorModeVarsV2 = addColorModeVarsV2;
