import React from 'react';
import { Tooltip } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
/**
 * MetricTitle 标题组件
 * 
 * 负责渲染标题、副标题和提示信息
 * 支持自定义字号、字重、颜色等样式
 * 
 * @param props 组件属性
 */
var MetricTitle = function MetricTitle(_ref) {
  var title = _ref.title,
    subtitle = _ref.subtitle,
    tooltip = _ref.tooltip,
    _ref$titleSize = _ref.titleSize,
    titleSize = _ref$titleSize === void 0 ? 14 : _ref$titleSize,
    _ref$titleWeight = _ref.titleWeight,
    titleWeight = _ref$titleWeight === void 0 ? 400 : _ref$titleWeight,
    _ref$titleColor = _ref.titleColor,
    titleColor = _ref$titleColor === void 0 ? 'rgba(0, 0, 0, 0.45)' : _ref$titleColor;
  var titleElement = /*#__PURE__*/React.createElement("div", {
    className: "pisell-metric-card-title-wrapper"
  }, /*#__PURE__*/React.createElement("div", {
    className: "pisell-metric-card-title",
    style: {
      fontSize: typeof titleSize === 'number' ? "".concat(titleSize, "px") : titleSize,
      fontWeight: titleWeight,
      color: titleColor,
      display: 'flex',
      alignItems: 'center',
      gap: '4px'
    }
  }, title, tooltip && /*#__PURE__*/React.createElement(Tooltip, {
    title: tooltip
  }, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
    style: {
      fontSize: 12,
      color: titleColor,
      cursor: 'help'
    }
  }))), subtitle && /*#__PURE__*/React.createElement("div", {
    className: "pisell-metric-card-subtitle",
    style: {
      fontSize: 12,
      fontWeight: 400,
      color: titleColor
    }
  }, subtitle));
  return titleElement;
};
export default MetricTitle;