console.error("MUI: Expected ".concat(propName, " argument to be a number or a string, got ").concat(abs, "."));
}
}
return themeSpacing * abs;
};
}
if (Array.isArray(themeSpacing)) {
return function (abs) {
if (typeof abs === 'string') {
return abs;
}
if (process.env.NODE_ENV !== 'production') {
if (!Number.isInteger(abs)) {
console.error(["MUI: The `theme.".concat(themeKey, "` array type cannot be combined with non integer values.") + "You should either use an integer value that can be used as index, or define the `theme.".concat(themeKey, "` as a number.")].join('\n'));
} else if (abs > themeSpacing.length - 1) {
console.error(["MUI: The value provided (".concat(abs, ") overflows."), "The supported values are: ".concat(JSON.stringify(themeSpacing), "."), "".concat(abs, " > ").concat(themeSpacing.length - 1, ", you need to add the missing values.")].join('\n'));
}
}
return themeSpacing[abs];
};
}
if (typeof themeSpacing === 'function') {
return themeSpacing;
}
if (process.env.NODE_ENV !== 'production') {
console.error(["MUI: The `theme.".concat(themeKey, "` value (").concat(themeSpacing, ") is invalid."), 'It should be a number, an array or a function.'].join('\n'));