import { cs } from "../utils/styles.js";
import { useStyleConfig } from "../core/theme.js";
import vui from "../core/vui.js";
import { useDialogContext } from "./context.js";
import { H4 } from "../heading/headings.js";
import { jsx } from "react/jsx-runtime";

//#region src/dialog/dialogTitle.tsx
/** Shows a title in the Dialog Header. Receives id linked to aria-labelledby on the Dialog for accessibility. */
const DialogTitle = vui((props, ref) => {
	const { className, ...rest } = props;
	const { titleId } = useDialogContext() ?? {};
	const styles = useStyleConfig("Dialog", useDialogContext());
	return /* @__PURE__ */ jsx(H4, {
		className: cs("vui-dialogTitle", className),
		id: titleId,
		ref,
		...styles.title,
		...rest
	});
});
DialogTitle.displayName = "DialogTitle";

//#endregion
export { DialogTitle as default };
globalThis.__vuiVersion__ = "4.0.0"
//# sourceMappingURL=dialogTitle.js.map