"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

function _defineProperty2() {
  const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

  _defineProperty2 = function () {
    return data;
  };

  return data;
}

function _command() {
  const data = _interopRequireDefault(require("../../command"));

  _command = function () {
    return data;
  };

  return data;
}

function _consumer() {
  const data = require("../../../api/consumer");

  _consumer = function () {
    return data;
  };

  return data;
}

function _linkTemplate() {
  const data = _interopRequireDefault(require("../../templates/link-template"));

  _linkTemplate = function () {
    return data;
  };

  return data;
}

function _constants() {
  const data = require("../../../constants");

  _constants = function () {
    return data;
  };

  return data;
}

class Install extends _command().default {
  constructor(...args) {
    super(...args);
    (0, _defineProperty2().default)(this, "name", 'install [ids...]');
    (0, _defineProperty2().default)(this, "description", `Installs all dependencies for all the sourced components (or for a specific one), whether they were defined in your package.json or in each of the sourced components, and links them. \n  https://${_constants().BASE_DOCS_DOMAIN}/docs/cli-install.html`);
    (0, _defineProperty2().default)(this, "alias", '');
    (0, _defineProperty2().default)(this, "opts", [['v', 'verbose', 'show a more verbose output when possible']]);
    (0, _defineProperty2().default)(this, "loader", true);
  }

  action([ids], {
    verbose = false
  }, packageManagerArgs) {
    return (0, _consumer().installAction)(ids, verbose, packageManagerArgs);
  }

  report(results) {
    return (0, _linkTemplate().default)(results);
  }

}

exports.default = Install;