"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _col = _interopRequireDefault(require("antd/lib/col"));
var _row = _interopRequireDefault(require("antd/lib/row"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var prefixCls = 'ol-map-analysis-popup-detail-items';

// eslint-disable-next-line react/prop-types
var DetailItem = function DetailItem(_ref) {
  var label = _ref.label,
    value = _ref.value,
    hideValueTitle = _ref.hideValueTitle;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefixCls, "-wrap")
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "".concat(prefixCls, "-label")
  }, label, "\uFF1A"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "".concat(prefixCls, "-text"),
    title: hideValueTitle ? '' : value
  }, value !== null && value !== void 0 ? value : '-'));
};
var DetailItems = function DetailItems(_ref2) {
  var items = _ref2.items;
  return /*#__PURE__*/_react["default"].createElement(_row["default"], null, items.map(function (item) {
    return /*#__PURE__*/_react["default"].createElement(_col["default"], {
      key: item.label,
      span: item.span || 24
    }, /*#__PURE__*/_react["default"].createElement(DetailItem, item));
  }));
};
DetailItems.propTypes = {
  items: _propTypes["default"].array
};
DetailItems.DetailItem = DetailItem;
var _default = exports["default"] = DetailItems;
//# sourceMappingURL=index.js.map
