const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_objectWithoutProperties = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_index = require("../pisellTooltip/index.js");
const require_index$1 = require("../iconfont/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
require("./index.less");
//#region src/components/pisellStatisticList/index.tsx
const _excluded = [
	"isHasBorder",
	"backgroundColors",
	"labelColor",
	"valueColor",
	"data"
];
const defaultColors = [
	"rgba(224, 79, 22, 0.20)",
	"rgba(202, 133, 4, 0.20)",
	"rgba(127, 86, 217, 0.22)",
	"rgba(7, 148, 85, 0.20)",
	"rgba(21, 112, 239, 0.23)"
];
const PisellStatisticList = (props) => {
	const { isHasBorder = true, backgroundColors = defaultColors, labelColor = "#fff", valueColor = "#fff", data } = props, others = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	return /* @__PURE__ */ react.default.createElement("div", require_objectSpread2._objectSpread2({ className: "pisell-lowcode-statistic-list-wrap" }, others), data.map((item, index) => {
		var _item$children;
		const { isLink = false, link = "", onClick } = item;
		return /* @__PURE__ */ react.default.createElement("div", {
			key: index,
			className: "pisell-lowcode-statistic-list-item",
			style: {
				background: backgroundColors[index % backgroundColors.length],
				border: isHasBorder ? "border: 1px solid var(--Gray-600, #475467)" : "none"
			}
		}, /* @__PURE__ */ react.default.createElement("div", {
			className: "pisell-lowcode-statistic-list-item-label",
			style: { color: labelColor }
		}, item.label, item.tip && /* @__PURE__ */ react.default.createElement(require_index.default, { title: item.tip }, /* @__PURE__ */ react.default.createElement(require_index$1.default, {
			style: { color: labelColor },
			type: "pisell2-help-circle",
			className: "pisell-lowcode-statistic-list-item-label-tip-icon"
		}))), /* @__PURE__ */ react.default.createElement("div", {
			className: "pisell-lowcode-statistic-list-item-value",
			style: { color: valueColor },
			onClick
		}, isLink && link ? /* @__PURE__ */ react.default.createElement("a", {
			href: "javascript:void(0);",
			onClick: () => {
				if (onClick) return;
				location.replace(item.link);
			}
		}, item.value || "-") : item.value || "-"), !!((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) && /* @__PURE__ */ react.default.createElement(antd.Row, { className: "pisell-lowcode-statistic-list-item-children-wrap" }, item.children.map((child) => {
			return /* @__PURE__ */ react.default.createElement(antd.Col, {
				span: 12,
				className: "pisell-lowcode-statistic-list-item-children-item"
			}, /* @__PURE__ */ react.default.createElement("span", {
				className: "pisell-lowcode-statistic-list-item-children-label",
				style: { color: labelColor }
			}, child.label), /* @__PURE__ */ react.default.createElement("span", {
				className: "pisell-lowcode-statistic-list-item-children-value",
				style: { color: valueColor }
			}, child.value || ""));
		})));
	}));
};
//#endregion
exports.default = PisellStatisticList;
