var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.taskRnvWorkspaceList=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _prompt=require("../../cli/prompt");
var _logger=require("../../core/systemManager/logger");




var _taskManager=require("../../core/taskManager");
var _constants=require("../../core/constants");

var taskRnvWorkspaceList=function taskRnvWorkspaceList(c,parentTask,originTask){var _c$files$rnv$configWo;var opts;return _regenerator.default.async(function taskRnvWorkspaceList$(_context){while(1){switch(_context.prev=_context.next){case 0:
(0,_logger.logTask)('taskRnvWorkspaceList');_context.next=3;return _regenerator.default.awrap(

(0,_taskManager.executeTask)(c,_constants.TASK_PROJECT_CONFIGURE,_constants.TASK_WORKSPACE_LIST,originTask));case 3:

opts=(0,_prompt.generateOptions)((_c$files$rnv$configWo=
c.files.rnv.configWorkspaces)==null?void 0:_c$files$rnv$configWo.workspaces,
true,
null,
function(i,obj,mapping,defaultVal){
var isConnected='';
return" ["+(0,_logger.chalk)().grey(i+1)+"]> "+(0,_logger.chalk)().bold(
defaultVal)+
isConnected+" \n";
});


(0,_logger.logToSummary)("Workspaces:\n\n"+opts.asString);case 5:case"end":return _context.stop();}}},null,null,null,Promise);};exports.taskRnvWorkspaceList=taskRnvWorkspaceList;var _default=


{
description:'Show list of all available workspaces',
fn:taskRnvWorkspaceList,
task:_constants.TASK_WORKSPACE_LIST,
params:_constants.PARAMS.withBase(),
platforms:[],
isGlobalScope:true};exports.default=_default;
//# sourceMappingURL=task.rnv.workspace.list.js.map