/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
import { cx, getStyles } from "../../../styles/styler.js";
import { Box } from "../../Box.js";
import { useInternalModalContext } from "./ModalContext.js";
import { useModalConfig } from "./UDSModalConfigProvider.js";
import { useScrollFade } from "./useScrollFade.js";
import { jsx } from "react/jsx-runtime";
//#region src/components/client/Modal/ModalContent.tsx
const ModalContent = ({ children, asChild = void 0, slotProps }) => {
	const { size } = useModalConfig();
	const { scrollBehavior } = useInternalModalContext();
	const scrollFadeProps = useScrollFade(scrollBehavior === "inside");
	const classNames = { content: getStyles({
		modalSizeSpacingHorizontal: size,
		overflowY: scrollBehavior === "inside" ? "auto" : void 0,
		display: "block",
		flexGrow: scrollBehavior === "inside" ? "1" : void 0
	}) };
	return /* @__PURE__ */ jsx(Box, {
		asChild,
		...slotProps?.root,
		...scrollFadeProps,
		style: {
			...scrollFadeProps.style,
			...slotProps?.root?.style
		},
		className: cx(classNames.content, slotProps?.root?.className),
		children
	});
};
ModalContent.displayName = "ModalContent";
ModalContent.__modalSlot = "content";
//#endregion
export { ModalContent };
