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

const appGlobalScript = () => {
    const themeResolver = (elm) => {
        const theme = window.eclTheme || 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-3068a084.js.map