// import React, {useCallback} from 'react';
import { Button } from 'antd';
import { compose, withHandlers } from 'recompose';
import { withConfirmHOC, spreadButtonPropsHOC } from "./mod/hoc";
export default compose(withConfirmHOC, withHandlers({
  onClick: function onClick(_ref) {
    var onBeforeClick = _ref.onBeforeClick,
      _onClick = _ref.onClick,
      onEmit = _ref.onEmit,
      eventName = _ref.eventName,
      _ref$additions = _ref.additions,
      additions = _ref$additions === void 0 ? {} : _ref$additions;
    return function (e) {
      onBeforeClick().then(function () {
        onEmit(eventName, additions);
        _onClick && _onClick(e);
      });
    };
  }
}), spreadButtonPropsHOC)(Button);