import { ConfigProvider } from "antd";
import classNames from "classnames";
import React, { useContext } from "react";
import { useStyle } from "./style";
var Title = function(param) {
    var title = param.title, subtitle = param.subtitle, style = param.style, className = param.className, customPrefixCls = param.prefixCls;
    var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
    var prefixCls = getPrefixCls('agentic-chatboot-title', customPrefixCls);
    var _useStyle = useStyle(prefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
    if (!title && !subtitle) {
        return null;
    }
    var mainCls = classNames("".concat(prefixCls, "-main"), hashId);
    var subtitleCls = classNames("".concat(prefixCls, "-subtitle"), hashId);
    return wrapSSR(/*#__PURE__*/ React.createElement("div", {
        className: classNames(prefixCls, hashId, className),
        style: style
    }, title && /*#__PURE__*/ React.createElement("div", {
        className: mainCls
    }, title), subtitle && /*#__PURE__*/ React.createElement("div", {
        className: subtitleCls
    }, subtitle)));
};
export default Title;
