"use client";
const require_parse_theme_color = require("../../../../MantineProvider/color-functions/parse-theme-color/parse-theme-color.cjs");
//#region packages/@mantine/core/src/core/Box/style-props/resolvers/color-resolver/color-resolver.ts
function colorResolver(color, theme) {
	const parsedColor = require_parse_theme_color.parseThemeColor({
		color,
		theme
	});
	if (parsedColor.color === "dimmed") return "var(--mantine-color-dimmed)";
	if (parsedColor.color === "bright") return "var(--mantine-color-bright)";
	return parsedColor.variable ? `var(${parsedColor.variable})` : parsedColor.color;
}
function textColorResolver(color, theme) {
	const parsedColor = require_parse_theme_color.parseThemeColor({
		color,
		theme
	});
	if (parsedColor.isThemeColor && parsedColor.shade === void 0) return `var(--mantine-color-${parsedColor.color}-text)`;
	return colorResolver(color, theme);
}
//#endregion
exports.colorResolver = colorResolver;
exports.textColorResolver = textColorResolver;

//# sourceMappingURL=color-resolver.cjs.map