/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_styles_styler = require("../styles/styler.cjs");
//#region src/utils/mergeSlotProps.ts
const mergeSlotProp = (slotProp, newSlotProp, onConflict = "overwriteOriginal") => {
	const allKeys = Array.from(new Set([...Object.keys(slotProp ?? {}), ...Object.keys(newSlotProp ?? {})]));
	return Object.fromEntries(allKeys.map((key) => {
		const originalValue = slotProp?.[key];
		const newValue = newSlotProp?.[key];
		if (originalValue && !newValue) return [key, originalValue];
		if (newValue && !originalValue) return [key, newValue];
		if (key === "className") return [key, require_styles_styler.cx(originalValue, newValue)];
		if (onConflict === "keepOriginal") return [key, originalValue];
		return [key, newValue];
	}));
};
const mergeSlotProps = (slotProps, newProps, onConflict = "overwriteOriginal") => {
	if (!slotProps) return newProps;
	const allKeys = Array.from(new Set([...Object.keys(slotProps), ...Object.keys(newProps)]));
	return Object.fromEntries(allKeys.map((key) => {
		const originalValue = slotProps[key];
		const newValue = newProps[key];
		return [key, mergeSlotProp(originalValue, newValue, onConflict)];
	}));
};
//#endregion
exports.mergeSlotProp = mergeSlotProp;
exports.mergeSlotProps = mergeSlotProps;
