import React from 'react';
export default ((children, indexComponent) => {
  let counter = -1;
  const indexedChildren = React.Children.map(children, child => {
    if (child.type.name === indexComponent) {
      counter++;
      return /*#__PURE__*/React.cloneElement(child, {
        index: counter
      }, child.props.children);
    } else {
      return child;
    }
  });
  return indexedChildren;
});
//# sourceMappingURL=getIndexedChildren.js.map