const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_useResponsive = require("../../hooks/useResponsive.js");
const require_usePisellConfig = require("../pisell-config-provider/hooks/usePisellConfig.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let antd = require("antd");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/cardMetricItem/index.tsx
const CardMetricItem = (props) => {
	(0, react.useEffect)(() => {
		document.body.id = "body";
	}, []);
	const { title = "", number, hint, tags, showCurrencySymbol = true, style } = props;
	const config = require_usePisellConfig.default();
	const amount = (0, react.useMemo)(() => {
		return (0, _pisell_utils.formatAmountWithOptions)(number, (config === null || config === void 0 ? void 0 : config.symbol) || "", { showCurrencySymbol });
	}, [number, showCurrencySymbol]);
	const responsive = require_useResponsive.default();
	return /* @__PURE__ */ react.default.createElement("div", {
		className: (0, classnames.default)("pisell-statistic-wrap", responsive === "pc" ? "pc" : "phone"),
		style
	}, /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("pisell-statistic-hint") }, hint), /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("pisell-statistic-tags") }, tags), /* @__PURE__ */ react.default.createElement(antd.Statistic, {
		title,
		value: amount
	}));
};
//#endregion
exports.default = CardMetricItem;
