import { jsx as _jsx } from "@emotion/react/jsx-runtime";
import { PortalManager, EnvironmentProvider, ChakraProvider, theme as defaultTheme, } from "@chakra-ui/react";
const ChakraNestedProvider = (props) => {
    const { children, portalZIndex, resetCSS, theme = defaultTheme, environment, cssVarsRoot, } = props;
    const _children = (_jsx(EnvironmentProvider, Object.assign({ environment: environment }, { children: children })));
    return (_jsx(ChakraProvider, Object.assign({ theme: theme, cssVarsRoot: cssVarsRoot, resetCSS: resetCSS }, { children: portalZIndex ? (_jsx(PortalManager, Object.assign({ zIndex: portalZIndex }, { children: _children }))) : (_children) })));
};
export default ChakraNestedProvider;
//# sourceMappingURL=ChakraNestedProvider.js.map