/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { fromEntries } from "../packages/utils/dist/fromEntries.js";
//#region ../tailwind-internal/dist/utils/getShadowVars.js
/*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
function getShadowVarsForType(shadowType, udsConfig) {
	const shadowTypeConfig = udsConfig.shadow?.[shadowType];
	if (!shadowTypeConfig) return {};
	return fromEntries(Object.entries(shadowTypeConfig).map(([shadowVariant, shadowPreset]) => {
		const value = shadowPreset.map((preset) => {
			const colorVar = preset.color.type === "palette" ? `--uds-shadow-color-${preset.color.value}` : `--uds-spectrum-color-${preset.color.value}`;
			const value = `${preset.offsetX} ${preset.offsetY} ${preset.blur} ${preset.spread} var(${colorVar})`;
			return shadowType === "inset" ? `inset ${value}` : value;
		}).join(",");
		return [`--uds-${shadowType}-shadow-${shadowVariant}`, value];
	}));
}
function getShadowVars(udsConfig) {
	return {
		...getShadowVarsForType("drop", udsConfig),
		...getShadowVarsForType("inset", udsConfig)
	};
}
//#endregion
export { getShadowVars };
