import { setMode } from "@stencil/core";
export default () => {
    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);
    });
};
//# sourceMappingURL=global.js.map
