import * as React from "react";
import { T as ThemeContext } from "../../../@emotion/react/dist/emotion-element-f0de968e.browser.esm.js";
function isObjectEmpty(obj) {
  return Object.keys(obj).length === 0;
}
function useTheme(defaultTheme = null) {
  const contextTheme = React.useContext(ThemeContext);
  return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
}
export {
  useTheme as default
};
