import { __rest, __assign } from '../../node_modules/tslib/tslib.es6.js';
import React, { useState, cloneElement } from 'react';
import { Tooltip as Tooltip$1 } from '@chakra-ui/react';

var Tooltip = function (_a) {
    var children = _a.children, props = __rest(_a, ["children"]);
    var _b = useState(false), isLabelOpen = _b[0], setIsLabelOpen = _b[1];
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    var childrenWithProps = cloneElement(children, {
        onMouseEnter: function () { return setIsLabelOpen(true); },
        onMouseLeave: function () { return setIsLabelOpen(false); },
        onClick: function () { return setIsLabelOpen(true); },
    });
    return (React.createElement(Tooltip$1, __assign({ hasArrow: true, placement: "auto", maxWidth: "6xl", isOpen: isLabelOpen }, props), childrenWithProps));
};

export { Tooltip as default };
//# sourceMappingURL=index.js.map
