"use client";
const require_Overlay = require("../Overlay/Overlay.cjs");
const require_Transition = require("../Transition/Transition.cjs");
const require_ModalBase_context = require("./ModalBase.context.cjs");
const require_use_modal_transition = require("./use-modal-transition.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/ModalBase/ModalBaseOverlay.tsx
function ModalBaseOverlay({ onClick, transitionProps, style, visible, ...others }) {
	const ctx = require_ModalBase_context.useModalBaseContext();
	const transition = require_use_modal_transition.useModalTransition(transitionProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Transition.Transition, {
		mounted: visible !== void 0 ? visible : ctx.opened,
		...transition,
		transition: "fade",
		children: (transitionStyles) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Overlay.Overlay, {
			fixed: true,
			style: [style, transitionStyles],
			zIndex: ctx.zIndex,
			unstyled: ctx.unstyled,
			onClick: (event) => {
				onClick?.(event);
				ctx.closeOnClickOutside && ctx.onClose();
			},
			...others
		})
	});
}
ModalBaseOverlay.displayName = "@mantine/core/ModalBaseOverlay";
//#endregion
exports.ModalBaseOverlay = ModalBaseOverlay;

//# sourceMappingURL=ModalBaseOverlay.cjs.map