Liferay.Loader.define("dynamic-data-mapping-form-report-web@1.0.20/js/components/summary/Summary.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/tooltip', 'frontend-js-react-web$react', './../../utils/numeric.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports["default"] = void 0;

    var _tooltip = require("@frontend-taglib-clay$clayui/tooltip");

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    var _numeric = require("./../../utils/numeric.es");

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { "default": obj };
    }

    function _extends() {
      _extends = Object.assign || function (target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
              target[key] = source[key];
            }
          }
        }return target;
      };return _extends.apply(this, arguments);
    }

    var _default = function _default(_ref) {
      var summary = _ref.summary;

      var getAttributes = function getAttributes(summaryItem) {
        return {
          className: 'value',
          title: (0, _numeric.formatNumber)(summaryItem)
        };
      };

      return _react["default"].createElement(_tooltip.ClayTooltipProvider, null, _react["default"].createElement("div", {
        className: "summary"
      }, _react["default"].createElement("div", {
        className: "summary-item"
      }, _react["default"].createElement("div", {
        className: "type"
      }, Liferay.Language.get('sum')), _react["default"].createElement("div", _extends({}, getAttributes(summary['sum']), {
        "data-tooltip-align": "bottom"
      }), (0, _numeric.formatNumber)(summary['sum'], true))), _react["default"].createElement("div", {
        className: "summary-item"
      }, _react["default"].createElement("div", {
        className: "type"
      }, Liferay.Language.get('average')), _react["default"].createElement("div", _extends({}, getAttributes(summary['average']), {
        "data-tooltip-align": "bottom"
      }), (0, _numeric.formatNumber)(summary['average'], true))), _react["default"].createElement("div", {
        className: "summary-item"
      }, _react["default"].createElement("div", {
        className: "type"
      }, Liferay.Language.get('min')), _react["default"].createElement("div", _extends({}, getAttributes(summary['min']), {
        "data-tooltip-align": "bottom"
      }), (0, _numeric.formatNumber)(summary['min'], true))), _react["default"].createElement("div", {
        className: "summary-item"
      }, _react["default"].createElement("div", {
        className: "type"
      }, Liferay.Language.get('max')), _react["default"].createElement("div", _extends({}, getAttributes(summary['max']), {
        "data-tooltip-align": "bottom"
      }), (0, _numeric.formatNumber)(summary['max'], true)))));
    };

    exports["default"] = _default;
    //# sourceMappingURL=Summary.es.js.map
  }
});
//# sourceMappingURL=Summary.es.js.map