const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../../../../Table/fields/utils/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
require("./index.less");
//#region src/components/table/Gallery/components/GalleryItem/components/Title/index.tsx
const prefix = "pisell-lowcode-";
const Title = (props) => {
	const { line, field, record, columnsMap } = props;
	const value = (0, react.useMemo)(() => {
		const column = columnsMap.get(field);
		if (column && column.dataIndex) return require_index.getValueByKeys(record, column.dataIndex);
		return "-";
	}, [
		columnsMap,
		record,
		field
	]);
	return /* @__PURE__ */ react.default.createElement("div", {
		className: `${prefix}gallery-item-title`,
		style: { WebkitLineClamp: line }
	}, value);
};
//#endregion
exports.default = Title;
