const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_hoc = require("../../utils/hoc.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
require("./index.less");
//#region src/components/badge/index.tsx
const Badge = require_hoc.withWrap((props) => {
	const { styleType = "", color = "" } = props;
	let state = props;
	(0, react.useEffect)(() => {
		document.body.id = "body";
	}, []);
	const formatColor = (color = "") => {
		let newColor = color;
		if (styleType === "default") newColor = "#f6f7f9";
		else if (styleType === "warning") newColor = "#D92D20";
		return newColor;
	};
	const BadgeProps = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, state), {}, {
		className: "pisell-badge-wrap",
		color: formatColor(color)
	});
	return /* @__PURE__ */ react.default.createElement(antd.Badge, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, BadgeProps), {}, { style: {
		borderColor: styleType === "default" ? "#e7e9ed" : state.color,
		color: styleType === "default" ? "#344054" : "#fff"
	} }));
});
//#endregion
exports.default = Badge;
