import { a as __rest, _ as __assign } from '../tslib.es6-faad35dc.js';
import { jsx } from 'react/jsx-runtime';
import { styled } from '@mui/material/styles';
import MuiTooltip, { tooltipClasses } from '@mui/material/Tooltip';

var TooltipSizeVariants;
(function (TooltipSizeVariants) {
    TooltipSizeVariants["Small"] = "small";
    TooltipSizeVariants["Medium"] = "medium";
    TooltipSizeVariants["Large"] = "large";
})(TooltipSizeVariants || (TooltipSizeVariants = {}));
var sizeMap = new Map([
    [TooltipSizeVariants.Small, { y: 0.5, x: 2 }],
    [TooltipSizeVariants.Medium, { y: 1, x: 3 }],
    [TooltipSizeVariants.Large, { y: 2.6, x: 4 }]
]);
var StyledTooltip = styled(function (_a) {
    var className = _a.className; _a.size; var props = __rest(_a, ["className", "size"]);
    return (jsx(MuiTooltip, __assign({}, props, { classes: { popper: className } }), void 0));
})(function (_a) {
    var _b;
    var _c, _d, _e, _f;
    var theme = _a.theme, size = _a.size;
    return (_b = {},
        _b["& ." + tooltipClasses.tooltip] = {
            padding: theme.spacing((_d = (_c = sizeMap.get(size)) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0, (_f = (_e = sizeMap.get(size)) === null || _e === void 0 ? void 0 : _e.x) !== null && _f !== void 0 ? _f : 0),
            borderRadius: size === TooltipSizeVariants.Small ? theme.borders.radius.sm : theme.borders.radius.xl1,
            boxShadow: theme.boxShadow.md
        },
        _b);
});
var Tooltip = function (_a) {
    var children = _a.children, props = __rest(_a, ["children"]);
    return jsx(StyledTooltip, __assign({}, props, { children: children }), void 0);
};

export { TooltipSizeVariants, Tooltip as default, sizeMap };
