'use client';
import 'react';
import ThemeProviderNoVars from './ThemeProviderNoVars.mjs';
import { CssVarsProvider } from './ThemeProviderWithVars.mjs';
import THEME_ID from './identifier.mjs';
import { jsx } from 'react/jsx-runtime';

function ThemeProvider({
  theme,
  ...props
}) {
  if (typeof theme === 'function') {
    return /*#__PURE__*/jsx(ThemeProviderNoVars, {
      theme: theme,
      ...props
    });
  }
  const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;
  if (!('colorSchemes' in muiTheme)) {
    return /*#__PURE__*/jsx(ThemeProviderNoVars, {
      theme: theme,
      ...props
    });
  }
  return /*#__PURE__*/jsx(CssVarsProvider, {
    theme: theme,
    ...props
  });
}

export { ThemeProvider as default };
//# sourceMappingURL=ThemeProvider.mjs.map
