const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
const require_useEngineContext = require("../../../../../../hooks/useEngineContext.js");
const require_status = require("../../status.js");
let react = require("react");
react = require_runtime.__toESM(react);
require("./index.less");
//#region src/plus/productSelect/ProductCard/SkuCard/components/Title/index.tsx
const Title = ({ props }) => {
	var _engineContext$appHel;
	const { dataSource, skuTextConfig } = props;
	const { translation } = (_engineContext$appHel = require_useEngineContext.default().appHelper) === null || _engineContext$appHel === void 0 ? void 0 : _engineContext$appHel.utils;
	const { isOpen, value, fontSize, fontWeight, color, ellipsisCount } = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuNameConfig) || {};
	if (!isOpen) return null;
	const finalStyle = (0, react.useMemo)(() => {
		return {
			fontSize,
			fontWeight,
			color,
			lineClamp: ellipsisCount
		};
	}, [
		fontSize,
		fontWeight,
		color,
		ellipsisCount
	]);
	return /* @__PURE__ */ react.default.createElement("div", {
		className: `${require_status.PREFIX}__card-title`,
		style: finalStyle
	}, translation(value || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.title)));
};
//#endregion
exports.default = Title;
