/**
 * amis-ui v6.12.0-beta.0
 * Copyright 2018-2025 fex
 */

import { __extends, __rest, __assign } from 'tslib';
import React__default from 'react';
import { themeable } from 'amis-core';

/**
 * @file Tooltip
 * @description
 * @author fex
 */
var Tooltip = /** @class */ (function (_super) {
    __extends(Tooltip, _super);
    function Tooltip() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Tooltip.prototype.render = function () {
        var _a = this.props; _a.classPrefix; var className = _a.className, tooltipTheme = _a.tooltipTheme, title = _a.title, children = _a.children, arrowProps = _a.arrowProps, style = _a.style; _a.placement; _a.arrowOffsetLeft; _a.arrowOffsetTop; _a.positionLeft; _a.positionTop; var cx = _a.classnames, activePlacement = _a.activePlacement, showArrow = _a.showArrow, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, arrowClassName = _a.arrowClassName, bodyClassName = _a.bodyClassName; _a.componentId; var rest = __rest(_a, ["classPrefix", "className", "tooltipTheme", "title", "children", "arrowProps", "style", "placement", "arrowOffsetLeft", "arrowOffsetTop", "positionLeft", "positionTop", "classnames", "activePlacement", "showArrow", "onMouseEnter", "onMouseLeave", "arrowClassName", "bodyClassName", "componentId"]);
        return (React__default.createElement("div", __assign({}, rest, { className: cx("Tooltip", activePlacement ? "Tooltip--".concat(activePlacement) : '', className, "Tooltip--".concat(tooltipTheme === 'dark' ? 'dark' : 'light')), style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, role: "tooltip" }),
            showArrow ? (React__default.createElement("div", __assign({ className: cx(arrowClassName, 'Tooltip-arrow') }, arrowProps))) : null,
            title ? React__default.createElement("div", { className: cx('Tooltip-title') }, title) : null,
            React__default.createElement("div", { className: cx(bodyClassName, 'Tooltip-body') }, children)));
    };
    Tooltip.defaultProps = {
        className: '',
        tooltipTheme: 'light',
        showArrow: true
    };
    return Tooltip;
}(React__default.Component));
var Tooltip$1 = themeable(Tooltip);

export { Tooltip, Tooltip$1 as default };
