"use strict";

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

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

function _bluebird() {
  const data = require("bluebird");

  _bluebird = function () {
    return data;
  };

  return data;
}

function _scope() {
  const data = require("../../../scope");

  _scope = function () {
    return data;
  };

  return data;
}

function _modelComponent() {
  const data = _interopRequireDefault(require("../../../scope/models/model-component"));

  _modelComponent = function () {
    return data;
  };

  return data;
}

function _object() {
  const data = _interopRequireDefault(require("../../../scope/objects/object"));

  _object = function () {
    return data;
  };

  return data;
}

function _symlink() {
  const data = _interopRequireDefault(require("../../../scope/models/symlink"));

  _symlink = function () {
    return data;
  };

  return data;
}

var _default =
/*#__PURE__*/
function () {
  var _catScope = (0, _bluebird().coroutine)(function* (path, full) {
    const scope = yield (0, _scope().loadScope)(path);
    const bitObjects = yield scope.objects.list();
    return full ? bitObjects : bitObjects.filter(obj => obj instanceof _modelComponent().default || obj instanceof _symlink().default);
  });

  function catScope(_x, _x2) {
    return _catScope.apply(this, arguments);
  }

  return catScope;
}();

exports.default = _default;