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 AntdMentions from "antd/es/mentions";
import "antd/es/mentions/style";
var getMentions = AntdMentions.getMentions,
    Option = AntdMentions.Option;

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

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

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

    _createClass(FdxMentions, [{
        key: "render",
        value: function render() {
            var _a = this.props,
                children = _a.children,
                forwardedRef = _a.forwardedRef,
                rest = __rest(_a, ["children", "forwardedRef"]);
            return React.createElement(
                AntdMentions,
                _extends({ ref: forwardedRef }, rest),
                children
            );
        }
    }]);

    return FdxMentions;
}(Component);

var Mentions = React.forwardRef(function (props, ref) {
    return React.createElement(FdxMentions, _extends({}, props, { forwardedRef: ref }));
});
Mentions.Option = Option;
Mentions.getMentions = getMentions;
export default Mentions;