var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React, { useMemo } from 'react';
import { ThemeProvider as MuiThemeProvider } from '@mui/styles';
import { experimental_extendTheme as extendTheme, Experimental_CssVarsProvider as CssVarsProvider } from '@mui/material/styles';
export var ThemeProvider = function (_a) {
    var children = _a.children, theme = _a.theme, darkTheme = _a.darkTheme;
    var reltioTheme = useMemo(function () {
        return extendTheme({
            colorSchemes: {
                light: __assign({}, theme),
                dark: __assign({}, darkTheme)
            }
        });
    }, [theme, darkTheme]);
    return (React.createElement(CssVarsProvider, { theme: reltioTheme },
        React.createElement(MuiThemeProvider, { theme: theme }, children)));
};
