"use client";
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
const require_Paper = require("../Paper/Paper.cjs");
const require_Transition = require("../Transition/Transition.cjs");
const require_FocusTrap = require("../FocusTrap/FocusTrap.cjs");
const require_ModalBase_context = require("./ModalBase.context.cjs");
const require_ModalBase_module = require("./ModalBase.module.cjs");
let clsx = require("clsx");
clsx = require_runtime.__toESM(clsx);
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/ModalBase/ModalBaseContent.tsx
function ModalBaseContent({ transitionProps, className, innerProps, onKeyDown, style, ref, ...others }) {
	const ctx = require_ModalBase_context.useModalBaseContext();
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Transition.Transition, {
		mounted: ctx.opened,
		transition: "pop",
		...ctx.transitionProps,
		onExited: () => {
			ctx.onExitTransitionEnd?.();
			ctx.transitionProps?.onExited?.();
		},
		onEntered: () => {
			ctx.onEnterTransitionEnd?.();
			ctx.transitionProps?.onEntered?.();
		},
		...transitionProps,
		children: (transitionStyles) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
			...innerProps,
			className: (0, clsx.default)({ [require_ModalBase_module.default.inner]: !ctx.unstyled }, innerProps.className),
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FocusTrap.FocusTrap, {
				active: ctx.opened && ctx.trapFocus,
				innerRef: ref,
				children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Paper.Paper, {
					...others,
					component: "section",
					role: "dialog",
					tabIndex: -1,
					"aria-modal": true,
					"aria-describedby": ctx.bodyMounted ? ctx.getBodyId() : void 0,
					"aria-labelledby": ctx.titleMounted ? ctx.getTitleId() : void 0,
					style: [style, transitionStyles],
					className: (0, clsx.default)({ [require_ModalBase_module.default.content]: !ctx.unstyled }, className),
					unstyled: ctx.unstyled,
					children: others.children
				})
			})
		})
	});
}
ModalBaseContent.displayName = "@mantine/core/ModalBaseContent";
//#endregion
exports.ModalBaseContent = ModalBaseContent;

//# sourceMappingURL=ModalBaseContent.cjs.map