import React__default, { useState } from 'react';
import Tooltip from '../../../../../../node_modules/@mui/material/Tooltip/Tooltip.mjs';
import styled from '../../../../../../node_modules/@mui/material/styles/styled.mjs';

const HoverTarget = styled('span')({
    display: 'flex',
    cursor: 'pointer'
});
const TooltipCore = ({ text, children, disabled, open, placement = 'right', TypographyComponent: Typography })=>{
    const [isOpen, setIsOpen] = useState(open);
    if (disabled) {
        return children;
    }
    return /*#__PURE__*/ React__default.createElement(Tooltip, {
        onClose: ()=>setIsOpen(false),
        onOpen: ()=>setIsOpen(true),
        open: isOpen,
        placement: placement,
        title: /*#__PURE__*/ React__default.createElement(Typography, {
            variant: "body2"
        }, text)
    }, /*#__PURE__*/ React__default.createElement(HoverTarget, null, children));
};

export { TooltipCore };
//# sourceMappingURL=Tooltip.mjs.map
