import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _Balloon from "@alifd/next/es/balloon";
var _excluded = ["__designMode", "defaultVisible", "visible", "mode", "children"];
var Tooltip = _Balloon.Tooltip;
export default (function (props) {
  if (props === void 0) {
    props = {};
  }
  var _ref = props || {},
    __designMode = _ref.__designMode,
    defaultVisible = _ref.defaultVisible,
    visible = _ref.visible,
    mode = _ref.mode,
    children = _ref.children,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  console.log('props: ', props);
  var RealComponent = mode === 'Tooltip' ? Tooltip : _Balloon;
  var finalValue = __designMode === 'design' ? defaultVisible : visible;
  var finalProps = _extends({}, otherProps);
  if (typeof finalValue !== 'undefined') {
    finalProps.visible = finalValue;
  }
  if (typeof defaultVisible !== 'undefined') {
    finalProps.defaultVisible = defaultVisible;
  }
  return /*#__PURE__*/React.createElement(RealComponent, finalProps, children);
});