"use strict";
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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Tooltip = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const styled_components_1 = require("styled-components");
const react_2 = __importDefault(require("@tippyjs/react"));
require("tippy.js/animations/shift-away-subtle.css"); // eslint-disable-line import/no-extraneous-dependencies
require("tippy.js/dist/tippy.css"); // eslint-disable-line import/no-extraneous-dependencies
const theme_1 = require("../../theme");
const Icon_1 = require("../Icon");
const Tooltip = (_a) => {
    var { variant, icon = theme_1.polyIcons.InformationOutline, color = 'brandMain', size = '16px', animation = 'shift-away-subtle', children, onHover } = _a, props = __rest(_a, ["variant", "icon", "color", "size", "animation", "children", "onHover"]);
    const currentTheme = react_1.useContext(styled_components_1.ThemeContext);
    return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(currentTheme.TOOLTIP, {}, void 0), jsx_runtime_1.jsx(react_2.default, Object.assign({ animation: animation }, props, { children: jsx_runtime_1.jsx("span", Object.assign({ onMouseEnter: onHover }, { children: variant === 'icon' ? (jsx_runtime_1.jsx(Icon_1.Icon, { variant: "basic", icon: icon, size: size, color: color }, void 0)) : (children) }), void 0) }), void 0)] }, void 0));
};
exports.Tooltip = Tooltip;
//# sourceMappingURL=Tooltip.js.map