import { getValueByKeys } from "../../../../../Table/fields/utils/index.js";
import React, { useMemo } from "react";
import "./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 = useMemo(() => {
		const column = columnsMap.get(field);
		if (column && column.dataIndex) return getValueByKeys(record, column.dataIndex);
		return "-";
	}, [
		columnsMap,
		record,
		field
	]);
	return /* @__PURE__ */ React.createElement("div", {
		className: `${prefix}gallery-item-title`,
		style: { WebkitLineClamp: line }
	}, value);
};
//#endregion
export { Title as default };
