"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = titleMessageRender;
var _balloon = _interopRequireDefault(require("@alifd/next/lib/balloon"));
var _icon = _interopRequireDefault(require("@alifd/next/lib/icon"));
var _react = _interopRequireDefault(require("react"));
function titleMessageRender(title, message, prefix) {
  if (!message) {
    return title;
  } else {
    return /*#__PURE__*/_react["default"].createElement("span", {
      className: prefix + "column-title"
    }, title, /*#__PURE__*/_react["default"].createElement(_balloon["default"].Tooltip, {
      trigger: /*#__PURE__*/_react["default"].createElement(_icon["default"], {
        type: "prompt-filling",
        className: prefix + "column-tooltip",
        size: "small"
      }),
      align: "t"
    }, message));
  }
}