const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_types = require("../types.js");
let react = require("react");
react = require_runtime.__toESM(react);
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/hardwareErrorTip/errorTipStatistics/index.tsx
const renderErrorItem = (errorType, count) => {
	const IconComponent = errorType.icon;
	const theme = require_types.ErrorTypeTheme[errorType.type];
	return /* @__PURE__ */ react.default.createElement("div", {
		key: errorType.type,
		className: (0, classnames.default)(`${require_types.prefix}-error-tip-statistics-item ${errorType.type}`),
		style: {
			backgroundColor: theme.backgroundColor,
			boxShadow: `0px 0px 3px 0px ${theme.shadowColor}`
		}
	}, /* @__PURE__ */ react.default.createElement(IconComponent, { style: {
		color: theme.iconColor,
		fontSize: 28
	} }), /* @__PURE__ */ react.default.createElement("div", { className: "statistics-item-info" }, /* @__PURE__ */ react.default.createElement("div", { className: "statistics-item-title" }, errorType.title()), /* @__PURE__ */ react.default.createElement("div", { className: "statistics-item-count" }, count)));
};
const Statistics = (props) => {
	const { data = {
		fatal: 0,
		critical: 0,
		normal: 0,
		info: 0
	} } = props;
	return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`${require_types.prefix}-error-tip-statistics`) }, require_types.errorTypes.map((errorType) => renderErrorItem(errorType, data[errorType.type])));
};
//#endregion
exports.default = Statistics;
