function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
var BallWave = function BallWave(props, ref) {
  var rootRef = useRef(null);
  useImperativeHandle(ref, function () {
    return {
      rootDOM: rootRef.current,
      getRootDOM: function getRootDOM() {
        return rootRef.current;
      }
    };
  });
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
    className: "loading-ballwave".concat(props !== null && props !== void 0 && props.className ? ' ' + props.className : ''),
    ref: rootRef
  }), /*#__PURE__*/React.createElement("svg", {
    viewBox: "20 0 60 40"
  }, /*#__PURE__*/React.createElement("g", {
    stroke: "none",
    strokeWidth: "1",
    fill: "none",
    fillRule: "evenodd"
  }, /*#__PURE__*/React.createElement("g", {
    transform: "translate(-100.000000, -71.000000)"
  }, /*#__PURE__*/React.createElement("g", {
    transform: "translate(95.000000, 71.000000)"
  }, /*#__PURE__*/React.createElement("g", {
    transform: "translate(5.000000, 0.000000)"
  }, [0, 1, 2].map(function (i) {
    return /*#__PURE__*/React.createElement("rect", {
      key: i,
      fill: "currentColor",
      x: 20 + i * 26,
      y: "16",
      width: "8",
      height: "8",
      rx: "2"
    }, /*#__PURE__*/React.createElement("animate", {
      attributeName: "y",
      from: "16",
      to: "16",
      dur: "2s",
      begin: "".concat(i * 0.2, "s"),
      repeatCount: "indefinite",
      values: "16; 6; 26; 16; 16",
      keyTimes: "0; 0.1; 0.3; 0.4; 1"
    }));
  })))))));
};
export default /*#__PURE__*/forwardRef(BallWave);