import React from "react";
import { Tooltip } from "antd";
import { QuestionCircleOutlined } from "@ant-design/icons";
//#region src/components/pisellMetricCard/components/MetricTitle.tsx
/**
* MetricTitle 标题组件
* 
* 负责渲染标题、副标题和提示信息
* 支持自定义字号、字重、颜色等样式
* 
* @param props 组件属性
*/
const MetricTitle = ({ title, subtitle, tooltip, titleSize = 14, titleWeight = 400, titleColor = "rgba(0, 0, 0, 0.45)" }) => {
	return /* @__PURE__ */ React.createElement("div", { className: "pisell-metric-card-title-wrapper" }, /* @__PURE__ */ React.createElement("div", {
		className: "pisell-metric-card-title",
		style: {
			fontSize: typeof titleSize === "number" ? `${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));
};
//#endregion
export { MetricTitle as default };
