"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = _default;

function _default(props) {
  var togglePopup = props.togglePopup,
      isPopupOpen = props.isPopupOpen,
      removeClose = props.removeClose,
      position = props.position,
      children = props.children,
      placement = props.placement,
      getTargetRef = props.getTargetRef,
      getContainerRef = props.getContainerRef;
  var popupProps = {
    togglePopup: togglePopup,
    isPopupOpen: isPopupOpen,
    removeClose: removeClose,
    position: position,
    placement: placement,
    getTargetRef: getTargetRef,
    getContainerRef: getContainerRef
  };
  var childrenWithProps = React.Children.map(children, function (child, index) {
    return React.cloneElement(child, popupProps);
  });
  delete childrenWithProps.children;
  return childrenWithProps;
}