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: 1, x: 2 }],
    [TooltipSizeVariants.Medium, { y: 2, x: 3 }],
    [TooltipSizeVariants.Large, { y: 3, x: 3 }]
]);
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, _c;
    var _d, _e, _f, _g;
    var theme = _a.theme, size = _a.size;
    return (_b = {},
        _b["& .".concat(tooltipClasses.tooltip)] = (_c = {
                padding: theme.spacing((_e = (_d = sizeMap.get(size)) === null || _d === void 0 ? void 0 : _d.y) !== null && _e !== void 0 ? _e : 0, (_g = (_f = sizeMap.get(size)) === null || _f === void 0 ? void 0 : _f.x) !== null && _g !== void 0 ? _g : 0),
                borderRadius: size === TooltipSizeVariants.Small ? theme.borders.radius.sm : theme.borders.radius.lg,
                boxShadow: theme.boxShadow.md
            },
            _c[theme.breakpoints.down("sm")] = {
                padding: theme.spacing(2),
                borderRadius: size === TooltipSizeVariants.Small ? theme.borders.radius.xs1 : theme.borders.radius.sm
            },
            _c),
        _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 };
