import Vue from 'vue';
import ComponentMixinPlugin from './component/component-mixin';
import { WindowErrorHandler } from './errors/window-error-handler';
import HttpPlugin from './http/http';
import I18nPlugin from './i18n/i18n';
import L10nPlugin from './l10n/l10n';
import LoggerPlugin from './logger/logger';
import MediaQueriesPlugin from './media-queries/media-queries';
import ModulPlugin from './modul/modul';
import ScrollToPlugin from './scroll-to/scroll-to';
import SpritesPlugin from './svg/sprites';
import SvgSpritePlugin from './svg/svg-sprite';
var UtilsPlugin = {
    install: function (v, options) {
        if (!options || options.propagateVueParserErrors === undefined || options.propagateVueParserErrors) {
            // Vue parser errors do not propagate to window.onError by default
            Vue.config.errorHandler = function (err, vm, info) {
                WindowErrorHandler.onError(new ErrorEvent('error', { error: err }));
            };
        }
        if (!v.prototype.$log) {
            Vue.use(LoggerPlugin, options ? options.consoleOptions : undefined);
        }
        else if (options) {
            v.prototype.$log.setConsoleOptions(options.consoleOptions);
        }
        Vue.use(I18nPlugin, options.i18PluginOptions);
        Vue.use(L10nPlugin, options.l10nPluginOptions);
        Vue.use(HttpPlugin, options.httpPluginOptions);
        Vue.use(MediaQueriesPlugin);
        Vue.use(SpritesPlugin);
        Vue.use(ModulPlugin, options.modulPluginOptions);
        Vue.use(SvgSpritePlugin);
        Vue.use(ScrollToPlugin);
        Vue.use(ComponentMixinPlugin);
    }
};
export default UtilsPlugin;
//# sourceMappingURL=utils-plugin.js.map