import { jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import clsx from "clsx";
import { Box } from "../../core/Box/Box.mjs";
import { useModalBaseContext } from "./ModalBase.context.mjs";
import { useModalTitle } from "./use-modal-title-id.mjs";
import classes from "./ModalBase.module.css.mjs";
const ModalBaseTitle = forwardRef(
  ({ className, ...others }, ref) => {
    const id = useModalTitle();
    const ctx = useModalBaseContext();
    return /* @__PURE__ */ jsx(
      Box,
      {
        component: "h2",
        ref,
        className: clsx({ [classes.title]: !ctx.unstyled }, className),
        ...others,
        id
      }
    );
  }
);
ModalBaseTitle.displayName = "@mantine/core/ModalBaseTitle";
export {
  ModalBaseTitle
};
