const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
const require_status = require("../../status.js");
let react = require("react");
react = require_runtime.__toESM(react);
require("./index.less");
//#region src/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.tsx
const CardMask = ({ props }) => {
	const { isOpen, fontSize, fontWeight, color, slot, text, background } = props;
	if (!isOpen) return null;
	if (slot) return slot;
	const finalStyle = (0, react.useMemo)(() => {
		return {
			fontSize,
			fontWeight,
			color,
			backgroundColor: background
		};
	}, [
		fontSize,
		fontWeight,
		color,
		background
	]);
	return text ? /* @__PURE__ */ react.default.createElement("div", {
		className: `${require_status.PREFIX}__card-mask`,
		style: finalStyle
	}, /* @__PURE__ */ react.default.createElement("span", { className: `${require_status.PREFIX}__card-mask-text` }, text)) : null;
};
//#endregion
exports.default = CardMask;
