'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.resetResolver = exports.getResolver = exports.setResolver = undefined;

var _scope;

function _load_scope() {
  return _scope = require('../../../scope');
}

var setResolver = exports.setResolver = function setResolver(currentPath, resolverPath) {
  return (0, (_scope || _load_scope()).loadScope)(currentPath).then(function (scope) {
    scope.scopeJson.resolverPath = resolverPath;
    return scope.scopeJson.write(scope.getPath());
  });
};
var getResolver = exports.getResolver = function getResolver(currentPath) {
  return (0, (_scope || _load_scope()).loadScope)(currentPath).then(function (scope) {
    return scope.scopeJson.resolverPath;
  });
};

var resetResolver = exports.resetResolver = function resetResolver(currentPath) {
  return (0, (_scope || _load_scope()).loadScope)(currentPath).then(function (scope) {
    scope.scopeJson.resolverPath = null;
    return scope.scopeJson.write(scope.getPath());
  });
};