import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["hiddenClassName", "hidden"];
import React, { Children, memo } from 'react';

var LazyRenderBox = function LazyRenderBox(props) {
  var hiddenClassName = props.hiddenClassName,
      hidden = props.hidden,
      rest = _objectWithoutProperties(props, _excluded);

  if (hiddenClassName || Children.count(rest.children) > 1) {
    if (hidden && hiddenClassName) {
      rest.className += " ".concat(hiddenClassName);
    }

    return /*#__PURE__*/React.createElement("div", rest);
  }

  return Children.only(rest.children);
};

LazyRenderBox.displayName = 'RcLazyRenderBox';
export default /*#__PURE__*/memo(LazyRenderBox, function (props, nextProps) {
  return !nextProps.hiddenClassName && nextProps.hidden;
});
//# sourceMappingURL=LazyRenderBox.js.map
