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/Time/index.tsx
const Time = ({ props }) => {
	const { dataSource, skuTextConfig } = props;
	const { isOpen, fontSize, fontWeight, color, customText } = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuTimeConfig) || {};
	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.time) ? /* @__PURE__ */ react.default.createElement("div", {
		className: `${require_status.PREFIX}__card-time`,
		style: finalStyle
	}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.time) : null;
};
//#endregion
exports.default = Time;
