import { __assign, __rest } from "tslib";
import React, { useContext } from 'react';
import classNames from 'classnames';
import Popup from '../popup';
import { ConfigContext } from '../config-provider/config-context';
import { getPrefixCls } from '../_utils/general';
var Tooltip = function (props) {
    var _a = props.trigger, trigger = _a === void 0 ? 'hover' : _a, customisedCls = props.prefixCls, title = props.title, className = props.className, children = props.children, otherProps = __rest(props, ["trigger", "prefixCls", "title", "className", "children"]);
    var configContext = useContext(ConfigContext);
    var prefixCls = getPrefixCls('tooltip', configContext.prefixCls, customisedCls);
    var cls = classNames(prefixCls, className);
    var renderContent = function () { return (React.createElement("div", { role: "tooltip", className: prefixCls + "__inner" }, title)); };
    return (React.createElement(Popup, __assign({}, otherProps, { className: cls, theme: "dark", trigger: trigger, content: renderContent() }), children));
};
Tooltip.displayName = 'Tooltip';
export default Tooltip;
//# sourceMappingURL=index.js.map