import { filterProps } from "../../utils/filter-props/filter-props.mjs";
import "react";
import "react/jsx-runtime";
import { useMantineTheme } from "../MantineThemeProvider/MantineThemeProvider.mjs";
function useProps(component, defaultProps, props) {
  var _a;
  const theme = useMantineTheme();
  const contextPropsPayload = (_a = theme.components[component]) == null ? void 0 : _a.defaultProps;
  const contextProps = typeof contextPropsPayload === "function" ? contextPropsPayload(theme) : contextPropsPayload;
  return { ...defaultProps, ...contextProps, ...filterProps(props) };
}
export {
  useProps
};
