"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
require("./style");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function InfoCollection(props) {
  var _props$data = props.data,
    data = _props$data === void 0 ? [] : _props$data,
    _props$gap = props.gap,
    gap = _props$gap === void 0 ? 8 : _props$gap,
    _props$horizontal = props.horizontal,
    horizontal = _props$horizontal === void 0 ? false : _props$horizontal;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: horizontal ? 'info-collection-horizontal' : 'info-collection'
  }, data.map(function (item) {
    var style = {};
    if (item.color) style.color = item.color;
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "info-line",
      key: item.key,
      style: {
        marginBottom: gap
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      className: "label"
    }, item.label, "\uFF1A"), /*#__PURE__*/_react["default"].createElement("div", {
      className: "value",
      style: style
    }, item.value || '--'));
  }));
}
var _default = InfoCollection;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
