import { jsx as _jsx } from "react/jsx-runtime";
import Tooltip from '../Tooltip';
import { isTextTruncated, truncateText, } from '../../utils/truncateText/truncateText';
const TruncatedTooltip = ({ title, width, }) => {
    const isTruncated = isTextTruncated(title, width, 'pixel');
    return (_jsx(Tooltip, { title: isTruncated ? title : '', style: { cursor: isTruncated ? 'pointer' : 'default' }, children: truncateText(title, width, 'pixel') }));
};
export default TruncatedTooltip;
//# sourceMappingURL=TruncatedTooltip.js.map