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 from 'react';
import { createPortal } from 'react-dom';
function Guide(_ref) {
  var portal = _ref.portal,
    visible = _ref.visible,
    _ref$maskProps = _ref.maskProps,
    maskProps = _ref$maskProps === void 0 ? {} : _ref$maskProps,
    onVisibleChange = _ref.onVisibleChange;
  var handlerClick = function handlerClick(e) {
    e.stopPropagation();
    if (onVisibleChange) onVisibleChange(false);
  };
  return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", _extends({
    className: "mask share-mask".concat(maskProps.className ? ' ' + maskProps.className : '').concat(visible ? ' active' : '')
  }, maskProps, {
    onClick: handlerClick
  }), /*#__PURE__*/React.createElement("div", {
    className: "share-tip-arrow"
  }), /*#__PURE__*/React.createElement("div", {
    className: "share-tip"
  }, /*#__PURE__*/React.createElement("div", {
    className: "share-tip-text"
  }, "1.\u70B9\u51FB\u53F3\u4E0A\u89D2"), /*#__PURE__*/React.createElement("div", {
    className: "share-tip-text"
  }, "2.\u70B9\u51FB", /*#__PURE__*/React.createElement("div", {
    className: "share-tip-wechat-friend"
  }), "\u53D1\u9001\u7ED9\u670B\u53CB\u6216", /*#__PURE__*/React.createElement("div", {
    className: "share-tip-wechat-moment"
  }), "\u5206\u4EAB\u7ED9\u670B\u53CB\u5708"))), portal || document.getElementById('root') || document.body);
}
export default Guide;