import React, { useMemo } from "react";
import { getValueByKeys } from "../../../../../Table/fields/utils";
import "./index.less";
var prefix = "pisell-lowcode-";
var Title = function Title(props) {
  var line = props.line,
    field = props.field,
    record = props.record,
    columnsMap = props.columnsMap;
  var value = useMemo(function () {
    var column = columnsMap.get(field);
    if (column && column.dataIndex) {
      return getValueByKeys(record, column.dataIndex);
    }
    return "-";
  }, [columnsMap, record, field]);
  return /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefix, "gallery-item-title"),
    style: {
      WebkitLineClamp: line
    }
  }, value);
};
export default Title;