"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.withMuiTheme = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const CssBaseline_1 = require("@mui/material/CssBaseline");
const styles_1 = require("@mui/material/styles");
const react_1 = require("react");
const themes_1 = require("../themes");
const withMuiTheme = (Story, context) => {
    const { theme: themeKey } = context.globals;
    const theme = (0, react_1.useMemo)(() => themes_1.themes[themeKey] || themes_1.themes.light, [themeKey]);
    return ((0, jsx_runtime_1.jsxs)(styles_1.ThemeProvider, { theme: theme, children: [(0, jsx_runtime_1.jsx)(CssBaseline_1.default, {}), (0, jsx_runtime_1.jsx)(Story, {})] }));
};
exports.withMuiTheme = withMuiTheme;
//# sourceMappingURL=withMuiTheme.js.map