import { callAll } from "../utils/function.js";
import { cs } from "../utils/styles.js";
import { useStyleConfig } from "../core/theme.js";
import styled from "../core/styled.js";
import vui from "../core/vui.js";
import { useModalContext } from "./context.js";
import { jsx } from "react/jsx-runtime";

//#region src/modal/modalContent.tsx
const ModalContentBase = styled.divBox`
  display: flex;
  inset: 0px;
  position: fixed;
  z-index: modal;
`;
/** Wraps the content provided to the Modal component. */
const ModalContent = vui((props, ref) => {
	const { className, ...rest } = props;
	const { onBackdropClick } = useModalContext() ?? {};
	const styles = useStyleConfig("Modal", useModalContext());
	return /* @__PURE__ */ jsx(ModalContentBase, {
		className: cs("vui-modalContent", className),
		ref,
		tabIndex: -1,
		...styles.content,
		...rest,
		onClick: callAll(props.onClick, onBackdropClick)
	});
});
ModalContent.displayName = "ModalContent";

//#endregion
export { ModalContentBase, ModalContent as default };
globalThis.__vuiVersion__ = "4.0.1"
//# sourceMappingURL=modalContent.js.map