"use client";
const require_runtime = require("../../../../../_virtual/_rolldown/runtime.cjs");
let clsx = require("clsx");
clsx = require_runtime.__toESM(clsx);
//#region packages/@mantine/core/src/core/styles-api/use-styles/get-class-name/resolve-class-names/resolve-class-names.ts
const EMPTY_CLASS_NAMES = {};
function mergeClassNames(objects) {
	const merged = {};
	objects.forEach((obj) => {
		Object.entries(obj).forEach(([key, value]) => {
			if (merged[key]) merged[key] = (0, clsx.default)(merged[key], value);
			else merged[key] = value;
		});
	});
	return merged;
}
function resolveClassNames({ theme, classNames, props, stylesCtx }) {
	return mergeClassNames((Array.isArray(classNames) ? classNames : [classNames]).map((item) => typeof item === "function" ? item(theme, props, stylesCtx) : item || EMPTY_CLASS_NAMES));
}
//#endregion
exports.resolveClassNames = resolveClassNames;

//# sourceMappingURL=resolve-class-names.cjs.map