import "core-js/modules/es6.object.keys";
import "core-js/modules/web.dom.iterable";
import "core-js/modules/es6.array.iterator";
import "core-js/modules/es6.promise";
import "core-js/modules/es7.promise.finally";
import components from './core/components';
import directive from './core/libs/directive';
import './core/asset/sass/core.scss';
import component from './core/libs/store/manager';
import mxlBootstrapComponentAdapter from './core/libs/adapter';
import mxlBootstrapComponentSystemAdapter from './core/libs/systemAdapter';
import mxlBootstrapComponentUtils from './core/libs/utils';
export default function (core) {
  var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  directive.forEach(function (v) {
    return core.vue.use(v);
  });
  core.store.once('maxilo-bootstrap-component', component);
  var module = new mxlBootstrapComponentAdapter();
  module.useAlert = !!option.useAlert;
  core.register(module);
  core.mxl_bootstrap_component_adapter.add(new mxlBootstrapComponentSystemAdapter());
  core.utils.add('mxlvbc', mxlBootstrapComponentUtils);
  var pre = 'mxl';

  function depPre(target) {
    if (!target.__file && !target._compiled && !target.functional && !target._scopeId) {
      if (Array.isArray(target)) {
        target.forEach(function (v, i) {
          v = depPre(v);
          target[pre + core.utils._.upperFirst(i)] = v;
          delete target[i];
        });
      } else {
        Object.keys(target).forEach(function (key) {
          target[key] = depPre(target[key]);
          target[pre + core.utils._.upperFirst(key)] = target[key];
          delete target[key];
        });
      }
    }

    return target;
  }

  core.vue.depComponent(depPre(components));
}
;
