import { PREFIX } from "../../status.js";
import React, { useMemo } from "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 = useMemo(() => {
		return {
			fontSize,
			fontWeight,
			color
		};
	}, [
		fontSize,
		fontWeight,
		color
	]);
	return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.time) ? /* @__PURE__ */ React.createElement("div", {
		className: `${PREFIX}__card-time`,
		style: finalStyle
	}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.time) : null;
};
//#endregion
export { Time as default };
