/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-29d58ba | Cube Dev Team */
import { parseStyle } from "../utils/styles.js";

//#region src/tasty/styles/shadow.ts
function toBoxShadow(shadow) {
	const { values, mods, colors } = parseStyle(shadow).groups[0] ?? {
		values: [],
		mods: [],
		colors: []
	};
	const mod = mods[0] || "";
	const shadowColor = (colors && colors[0]) ?? "";
	return [
		mod,
		...values,
		shadowColor
	].join(" ");
}
function shadowStyle({ shadow }) {
	if (!shadow) return;
	if (shadow === true) shadow = "var(--shadow)";
	return { "box-shadow": shadow.split(",").map(toBoxShadow).join(",") };
}
shadowStyle.__lookupStyles = ["shadow"];

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