"use client";
import cx from "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] = cx(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
export { resolveClassNames };

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