import { jsx } from "react/jsx-runtime";
import "react";
import "clsx";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { factory } from "../../core/factory/factory.mjs";
import { ModalBaseCloseButton } from "../ModalBase/ModalBaseCloseButton.mjs";
import { useModalContext } from "./Modal.context.mjs";
import classes from "./Modal.module.css.mjs";
const defaultProps = {};
const ModalCloseButton = factory((_props, ref) => {
  const props = useProps("ModalCloseButton", defaultProps, _props);
  const { classNames, className, style, styles, vars, ...others } = props;
  const ctx = useModalContext();
  return /* @__PURE__ */ jsx(
    ModalBaseCloseButton,
    {
      ref,
      ...ctx.getStyles("close", { classNames, style, styles, className }),
      ...others
    }
  );
});
ModalCloseButton.classes = classes;
ModalCloseButton.displayName = "@mantine/core/ModalCloseButton";
export {
  ModalCloseButton
};
