/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
import { BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX, BACKGROUND_BLUR_RADIUS_PREFIX, BACKGROUND_COLOR_PREFIX } from "../../css-tokens/dist/index.js";
import { entries } from "../../utils/entries.js";
import { fromEntries } from "../../utils/fromEntries.js";
import { shadowVariantToCSS } from "./getShadowStyles.js";

//#region src/tailwind/utils/getElevationStyles.ts
function getElevationStyles({ config }) {
	const styles = fromEntries(entries(config.elevation).map(([level]) => shadowVariantToCSS("drop", `elevation-${level}`)));
	entries(config.elevation).forEach(([level]) => {
		styles[`.bg-elevation-${level}`] = {
			backgroundColor: `var(--${BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX}-elevation-${level})`,
			["@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))"]: {
				backgroundColor: `var(--${BACKGROUND_COLOR_PREFIX}-elevation-${level})`,
				WebkitBackdropFilter: `var(--${BACKGROUND_BLUR_RADIUS_PREFIX}-elevation-${level})`,
				backdropFilter: `var(--${BACKGROUND_BLUR_RADIUS_PREFIX}-elevation-${level})`
			}
		};
	});
	styles["@media (prefers-reduced-transparency)"] = entries(config.elevation).reduce((acc, [level]) => {
		acc[`.bg-elevation-${level}`] = {
			backgroundColor: `var(--${BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX}-elevation-${level})`,
			WebkitBackdropFilter: "none",
			backdropFilter: "none"
		};
		return acc;
	}, {});
	return styles;
}

//#endregion
export { getElevationStyles };
//# sourceMappingURL=getElevationStyles.js.map