import _extends from "babel-runtime/helpers/extends";
import _classCallCheck from "babel-runtime/helpers/classCallCheck";
import _createClass from "babel-runtime/helpers/createClass";
import _possibleConstructorReturn from "babel-runtime/helpers/possibleConstructorReturn";
import _inherits from "babel-runtime/helpers/inherits";
var __rest = this && this.__rest || function (s, e) {
    var t = {};
    for (var p in s) {
        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
    }if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
        if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
    }
    return t;
};
import React, { Component } from "react";
import AntdPopconfirm from "antd/es/popconfirm";
import PagePoint from "../page-point/pagePointEnhanced";
import { ConfigConsumer } from "../config-provider";
import "antd/es/popconfirm/style";

var Popconfirm = function (_Component) {
    _inherits(Popconfirm, _Component);

    function Popconfirm() {
        _classCallCheck(this, Popconfirm);

        return _possibleConstructorReturn(this, (Popconfirm.__proto__ || Object.getPrototypeOf(Popconfirm)).apply(this, arguments));
    }

    _createClass(Popconfirm, [{
        key: "render",
        value: function render() {
            var _this2 = this;

            var _a = this.props,
                title = _a.title,
                restProps = __rest(_a, ["title"]);
            return React.createElement(
                ConfigConsumer,
                null,
                function (_ref) {
                    var pagePoint = _ref.pagePoint;
                    return pagePoint ? React.createElement(PagePoint, _extends({ compType: "Popconfirm" }, _this2.props, { render: function render(eventprops) {
                            return React.createElement(AntdPopconfirm, _extends({ title: title }, restProps, eventprops, { "data-ui-role": "Popconfirm" }));
                        } })) : React.createElement(AntdPopconfirm, _extends({ title: title }, restProps));
                }
            );
        }
    }]);

    return Popconfirm;
}(Component);

export default Popconfirm;