"use client";
import { filterProps } from "../../utils/filter-props/filter-props.mjs";
import { useMantineTheme } from "../MantineThemeProvider/MantineThemeProvider.mjs";
//#region packages/@mantine/core/src/core/MantineProvider/use-props/use-props.ts
function useProps(component, defaultProps, props) {
	const theme = useMantineTheme();
	const names = (Array.isArray(component) ? component : [component]).filter(Boolean);
	let contextProps = {};
	for (const name of names) {
		const payload = theme.components[name]?.defaultProps;
		const resolved = typeof payload === "function" ? payload(theme) : payload;
		if (resolved) contextProps = {
			...contextProps,
			...resolved
		};
	}
	return {
		...defaultProps,
		...contextProps,
		...filterProps(props)
	};
}
//#endregion
export { useProps };

//# sourceMappingURL=use-props.mjs.map