"use client";
import { rem } from "../../core/utils/units-converters/rem.mjs";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { factory } from "../../core/factory/factory.mjs";
import { ModalBaseContent } from "../ModalBase/ModalBaseContent.mjs";
import { NativeScrollArea } from "../ModalBase/NativeScrollArea.mjs";
import { useModalContext } from "./Modal.context.mjs";
import Modal_module_default from "./Modal.module.mjs";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/Modal/ModalContent.tsx
const ModalContent = factory((_props) => {
	const { classNames, className, style, styles, vars, children, __hidden, ...others } = useProps("ModalContent", null, _props);
	const ctx = useModalContext();
	const Scroll = ctx.scrollAreaComponent || NativeScrollArea;
	return /* @__PURE__ */ jsx(ModalBaseContent, {
		...ctx.getStyles("content", {
			className,
			style,
			styles,
			classNames
		}),
		innerProps: ctx.getStyles("inner", {
			className,
			style,
			styles,
			classNames
		}),
		"data-full-screen": ctx.fullScreen || void 0,
		"data-modal-content": true,
		"data-hidden": __hidden || void 0,
		...others,
		children: /* @__PURE__ */ jsx(Scroll, {
			style: { maxHeight: ctx.fullScreen ? "100dvh" : `calc(100dvh - (${rem(ctx.yOffset)} * 2))` },
			children
		})
	});
});
ModalContent.classes = Modal_module_default;
ModalContent.displayName = "@mantine/core/ModalContent";
//#endregion
export { ModalContent };

//# sourceMappingURL=ModalContent.mjs.map