import { PREFIX } from "../../status.js";
import React, { useMemo } from "react";
//#region src/plus/productSelect/ProductCard/SkuCard/components/Resource/index.tsx
const Resource = ({ props }) => {
	const { dataSource, skuTextConfig } = props;
	const { isOpen, fontSize, fontWeight, color, customText } = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuResourceConfig) || {};
	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.resources) ? /* @__PURE__ */ React.createElement("div", {
		className: `${PREFIX}__card-resource`,
		style: finalStyle
	}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.resources) : null;
};
//#endregion
export { Resource as default };
