"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PreviewTooltip = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const uikit_1 = require("@gravity-ui/uikit");
const classname_1 = require("../classname.js");
const const_1 = require("./const.js");
require("./PreviewTooltip.css");
const b = (0, classname_1.cn)('preview-tooltip');
const PreviewTooltip = ({ preview, children }) => {
    if (!preview)
        return children;
    return ((0, jsx_runtime_1.jsx)(uikit_1.Tooltip, { placement: ['right', 'left'], className: b(), disabled: !preview, openDelay: const_1.ToolbarTooltipDelay.Open, closeDelay: const_1.ToolbarTooltipDelay.Close, content: (0, jsx_runtime_1.jsx)("div", { className: b('content'), children: preview }), children: children }));
};
exports.PreviewTooltip = PreviewTooltip;
//# sourceMappingURL=PreviewTooltip.js.map
