import _defineProperty from "@babel/runtime/helpers/defineProperty";
import React, { memo, useContext } from 'react';
import classNames from 'classnames';
import { Size } from '../_util/enum';
import ConfigContext from '../config-provider/ConfigContext';

var Group = function Group(props) {
  var _classNames;

  var customizePrefixCls = props.prefixCls,
      _props$className = props.className,
      className = _props$className === void 0 ? '' : _props$className,
      size = props.size,
      compact = props.compact,
      style = props.style,
      children = props.children;

  var _useContext = useContext(ConfigContext),
      getPrefixCls = _useContext.getPrefixCls;

  var prefixCls = getPrefixCls('input-group', customizePrefixCls);
  var cls = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-lg"), size === Size.large), _defineProperty(_classNames, "".concat(prefixCls, "-sm"), size === Size.small), _defineProperty(_classNames, "".concat(prefixCls, "-compact"), compact), _classNames), className);
  return /*#__PURE__*/React.createElement("span", {
    className: cls,
    style: style
  }, children);
};

Group.displayName = 'Group';
export default /*#__PURE__*/memo(Group);
//# sourceMappingURL=Group.js.map
