"use client";
import { CloseButton } from "../CloseButton/CloseButton.mjs";
import { useModalBaseContext } from "./ModalBase.context.mjs";
import ModalBase_module_default from "./ModalBase.module.mjs";
import cx from "clsx";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/ModalBase/ModalBaseCloseButton.tsx
function ModalBaseCloseButton({ className, onClick, ...others }) {
	const ctx = useModalBaseContext();
	return /* @__PURE__ */ jsx(CloseButton, {
		...others,
		onClick: (event) => {
			ctx.onClose();
			onClick?.(event);
		},
		className: cx({ [ModalBase_module_default.close]: !ctx.unstyled }, className),
		unstyled: ctx.unstyled
	});
}
ModalBaseCloseButton.displayName = "@mantine/core/ModalBaseCloseButton";
//#endregion
export { ModalBaseCloseButton };

//# sourceMappingURL=ModalBaseCloseButton.mjs.map