'use strict';

const shared = require('@vuedx/shared');
const vueLanguageservice = require('@vuedx/vue-languageservice');
const Path = require('path');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () {
            return e[k];
          }
        });
      }
    });
  }
  n['default'] = e;
  return Object.freeze(n);
}

const Path__namespace = /*#__PURE__*/_interopNamespace(Path);

var version = "0.7.4";

vueLanguageservice.pluginManager.fixConsole(console);
function init({ typescript }) {
    shared.Telemetry.setup('https://a1461052e1d94c7a9ee7c3f7add71b24@o237831.ingest.sentry.io/5595721', 'typescript-plugin-vue', version, 0.001, { typescriptVersion: typescript.versionMajorMinor });
    return {
        create(info) {
            return vueLanguageservice.pluginManager.create({
                ...info,
                typescript,
                typesDir: Path__namespace.resolve(__dirname, '..', 'runtime'),
            });
        },
        getExternalFiles(project) {
            return vueLanguageservice.pluginManager.getExternalFiles(project);
        },
        onConfigurationChanged(config) {
            vueLanguageservice.pluginManager.onConfigurationChanged(config);
        },
    };
}

/* eslint-disable import/first */
console.log = console.info = console.warn = console.debug = console.error = console.trace = () => { };

module.exports = init;
//# sourceMappingURL=index.js.map
