import React, { useContext } from 'react';
import TableContext from './TableContext';

var AggregationTreeGroups = function AggregationTreeGroups(props) {
  var trees = props.trees;

  var _useContext = useContext(TableContext),
      prefixCls = _useContext.prefixCls;

  if (trees.length > 1) {
    return /*#__PURE__*/React.createElement("div", {
      className: "".concat(prefixCls, "-aggregation-groups")
    }, trees.map(function (tree, index) {
      return /*#__PURE__*/React.createElement("div", {
        key: String(index),
        className: "".concat(prefixCls, "-aggregation-groups-tree")
      }, tree);
    }));
  }

  return trees[0];
};

AggregationTreeGroups.displayName = 'AggregationTreeGroups';
export default AggregationTreeGroups;
//# sourceMappingURL=AggregationTreeGroups.js.map
