"use client";
const require_css_variables_object_to_string = require("./css-variables-object-to-string.cjs");
//#region packages/@mantine/core/src/core/MantineProvider/convert-css-variables/convert-css-variables.ts
function convertCssVariables(input, selectorOverride) {
	const selectors = selectorOverride ? [selectorOverride] : [":root", ":host"];
	const sharedVariables = require_css_variables_object_to_string.cssVariablesObjectToString(input.variables);
	const shared = sharedVariables ? `${selectors.join(", ")}{${sharedVariables}}` : "";
	const dark = require_css_variables_object_to_string.cssVariablesObjectToString(input.dark);
	const light = require_css_variables_object_to_string.cssVariablesObjectToString(input.light);
	const selectorsWithScheme = (scheme) => selectors.map((selector) => selector === ":host" ? `${selector}([data-mantine-color-scheme="${scheme}"])` : `${selector}[data-mantine-color-scheme="${scheme}"]`).join(", ");
	return `${shared}\n\n${dark ? `${selectorsWithScheme("dark")}{${dark}}` : ""}\n\n${light ? `${selectorsWithScheme("light")}{${light}}` : ""}`;
}
//#endregion
exports.convertCssVariables = convertCssVariables;

//# sourceMappingURL=convert-css-variables.cjs.map