import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["children"];
import * as React from 'react';
import CircularProgressbar from './CircularProgressbar';
// This is a wrapper around CircularProgressbar that allows passing children,
// which will be vertically and horizontally centered inside the progressbar automatically.
function CircularProgressbarWithChildren(props) {
  var children = props.children,
    circularProgressbarProps = _objectWithoutProperties(props, _excluded);
  return /*#__PURE__*/React.createElement("div", {
    "data-test-id": "CircularProgressbarWithChildren"
  }, /*#__PURE__*/React.createElement("div", {
    style: {
      position: 'relative',
      width: '100%',
      height: '100%'
    }
  }, /*#__PURE__*/React.createElement(CircularProgressbar, circularProgressbarProps), props.children ? /*#__PURE__*/React.createElement("div", {
    "data-test-id": "CircularProgressbarWithChildren__children",
    style: {
      position: 'absolute',
      width: '100%',
      height: '100%',
      marginTop: '-100%',
      display: 'flex',
      flexDirection: 'column',
      justifyContent: 'center',
      alignItems: 'center'
    }
  }, props.children) : null));
}
export default CircularProgressbarWithChildren;