const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
const require_status = require("../../status.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
//#region src/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.tsx
const Capacity = ({ props }) => {
	const { dataSource, skuTextConfig } = props;
	const { isOpen, fontSize, fontWeight, color, customText } = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuCapacityConfig) || {};
	if (!isOpen) return null;
	if (customText) return customText;
	const finalStyle = (0, react.useMemo)(() => {
		return {
			fontSize,
			fontWeight,
			color
		};
	}, [
		fontSize,
		fontWeight,
		color
	]);
	return /* @__PURE__ */ react.default.createElement("div", {
		className: `${require_status.PREFIX}__card-capacity`,
		style: finalStyle
	}, _pisell_utils.locales.getText("pisell2.sku-card.capacity"), ":", " ", (dataSource === null || dataSource === void 0 ? void 0 : dataSource.capacity) || 0);
};
//#endregion
exports.default = Capacity;
