/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
const require_index = require('../../css-tokens/dist/index.cjs');
const require_entries = require('../../utils/entries.cjs');
const require_fromEntries = require('../../utils/fromEntries.cjs');
const require_composeTailwindPlugins = require('../utils/composeTailwindPlugins.cjs');
const require_borderWidth = require('./borderWidth.cjs');
const require_getElevationStyles = require('../utils/getElevationStyles.cjs');
let tailwindcss_plugin_js = require("tailwindcss/plugin.js");
tailwindcss_plugin_js = require_runtime.__toESM(tailwindcss_plugin_js);

//#region src/tailwind/plugins/elevation.ts
const getBorderWidthTheme = (config, mergeTokensIntoTailwindTheme) => {
	const elevationBorderWidths = require_fromEntries.fromEntries(require_entries.entries(config || {}).map(([level]) => [`elevation-${level}`, `var(--${require_index.BORDER_WIDTH_PREFIX}-elevation-${level})`]));
	if (!mergeTokensIntoTailwindTheme) return { [require_borderWidth.UDS_BORDER_WIDTH_THEME_KEY]: elevationBorderWidths };
	const namespacedBorderWidths = require_fromEntries.fromEntries(require_entries.entries(elevationBorderWidths).map(([key, cssVar]) => [`width-${key}`, cssVar]));
	return {
		[require_borderWidth.UDS_BORDER_WIDTH_THEME_KEY]: elevationBorderWidths,
		borderWidth: namespacedBorderWidths,
		outlineWidth: namespacedBorderWidths,
		outlineOffset: namespacedBorderWidths
	};
};
const elevationPlugin = tailwindcss_plugin_js.default.withOptions(({ config }) => ({ addUtilities }) => {
	addUtilities(require_getElevationStyles.getElevationStyles({ config }));
}, ({ config, disableOverrideTailwindTheme }) => {
	const shouldNotMergeBorderWidthTokensIntoTailwindTheme = require_composeTailwindPlugins.shouldNotMergeTokensIntoTailwindTheme(disableOverrideTailwindTheme, "borderWidth");
	const borderColor = require_fromEntries.fromEntries(require_entries.entries(config.elevation || {}).map(([level]) => [`elevation-${level}`, `var(--${require_index.LINE_COLOR_PREFIX}-elevation-${level})`]));
	return { theme: { extend: {
		borderColor,
		outlineColor: borderColor,
		...getBorderWidthTheme(config.elevation, !shouldNotMergeBorderWidthTokensIntoTailwindTheme)
	} } };
});

//#endregion
exports.elevationPlugin = elevationPlugin;