import '../../../../preact/compat/dist/compat.module.mjs';
import { T as ThemeContext } from '../../../../@emotion/react/dist/emotion-element-489459f2.browser.development.esm.mjs';
import { useContext as q } from '../../../../preact/hooks/dist/hooks.module.mjs';

function isObjectEmpty$1(obj) {
  return Object.keys(obj).length === 0;
}
function useTheme$3(defaultTheme = null) {
  const contextTheme = q(ThemeContext);
  return !contextTheme || isObjectEmpty$1(contextTheme) ? defaultTheme : contextTheme;
}

export { useTheme$3 as default };
//# sourceMappingURL=useThemeWithoutDefault.mjs.map
