"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const filterProps = require("../../utils/filter-props/filter-props.cjs");
require("react");
require("react/jsx-runtime");
const MantineThemeProvider = require("../MantineThemeProvider/MantineThemeProvider.cjs");
function useProps(component, defaultProps, props) {
  var _a;
  const theme = MantineThemeProvider.useMantineTheme();
  const contextPropsPayload = (_a = theme.components[component]) == null ? void 0 : _a.defaultProps;
  const contextProps = typeof contextPropsPayload === "function" ? contextPropsPayload(theme) : contextPropsPayload;
  return { ...defaultProps, ...contextProps, ...filterProps.filterProps(props) };
}
exports.useProps = useProps;
