import { jsx as _jsx } from "react/jsx-runtime";
import { useStyleConfig, vui } from '../core';
import { H4 } from '../heading';
import { cs } from '../utils';
import { useDialogContext } from './context';
/** Shows a title in the Dialog Header. Receives id linked to aria-labelledby on the Dialog for accessibility. */
export const DialogTitle = vui((props, ref) => {
    const { className, ...rest } = props;
    const { titleId } = useDialogContext() ?? {};
    const styles = useStyleConfig('Dialog', useDialogContext());
    return _jsx(H4, { className: cs('vui-dialogTitle', className), id: titleId, ref: ref, ...styles.title, ...rest });
});
DialogTitle.displayName = 'DialogTitle';
export default DialogTitle;
//# sourceMappingURL=dialogTitle.js.map