import 'react';
import { jsx } from 'react/jsx-runtime';
import extendSxProp from '../../system/esm/styleFunctionSx/extendSxProp.mjs';
import GlobalStyles from '../GlobalStyles/GlobalStyles.mjs';

function globalCss(styles) {
  return function GlobalStylesWrapper(props) {
    return (
      /*#__PURE__*/
      // Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value.
      jsx(GlobalStyles, {
        styles: typeof styles === 'function' ? theme => styles({
          theme,
          ...props
        }) : styles
      })
    );
  };
}

// eslint-disable-next-line @typescript-eslint/naming-convention
function internal_createExtendSxProp() {
  return extendSxProp;
}

export { globalCss, internal_createExtendSxProp };
//# sourceMappingURL=index.mjs.map
