import { a as setMode } from './index-0a3acb15.js';

const appGlobalScript = () => {
  const themeResolver = (elm) => {
    const theme = elm.theme || elm.getAttribute('theme');
    if (theme) {
      return theme;
    }
    else if (!elm.parentElement) {
      return 'ec';
    }
    else {
      return themeResolver(elm.parentElement);
    }
  };
  setMode((elm) => {
    return themeResolver(elm);
  });
};

const globalScripts = appGlobalScript;

export { globalScripts as g };

//# sourceMappingURL=app-globals-fe61b034.js.map