const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
const require_status = require("../../status.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/plus/productSelect/ProductCard/SkuCard/components/Duration/index.tsx
const Duration = ({ props }) => {
	var _productCardDefault$s;
	const { dataSource, skuTextConfig } = props;
	const { isOpen, fontSize, fontWeight, color, customText } = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuDurationConfig) || (require_status.productCardDefault === null || require_status.productCardDefault === void 0 || (_productCardDefault$s = require_status.productCardDefault.skuTextConfig) === null || _productCardDefault$s === void 0 ? void 0 : _productCardDefault$s.skuDurationConfig) || {};
	if (!isOpen) return null;
	if (customText) return customText;
	const finalStyle = (0, react.useMemo)(() => {
		return {
			fontSize,
			fontWeight,
			color
		};
	}, [
		fontSize,
		fontWeight,
		color
	]);
	return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.duration) ? /* @__PURE__ */ react.default.createElement("div", {
		className: `${require_status.PREFIX}__card-duration`,
		style: finalStyle
	}, (dataSource === null || dataSource === void 0 ? void 0 : dataSource.duration) || "") : null;
};
//#endregion
exports.default = Duration;
