var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getWorkspaceOptions=exports.rnvWorkspaceUpdate=exports.rnvWorkspaceConnect=exports.rnvWorkspaceAdd=exports.rnvWorkspaceList=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _chalk=_interopRequireDefault(require("chalk"));
var _prompt=require("../systemTools/prompt");
var _logger=require("../systemTools/logger");





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


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" ["+_chalk.default.grey(i+1)+"]> "+_chalk.default.bold(defaultVal)+isConnected+" \n";
});

(0,_logger.logToSummary)("Workspaces:\n\n"+opts.asString);case 3:case"end":return _context.stop();}}});};exports.rnvWorkspaceList=rnvWorkspaceList;


var rnvWorkspaceAdd=function rnvWorkspaceAdd(c){return _regenerator.default.async(function rnvWorkspaceAdd$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:
(0,_logger.logTask)('rnvWorkspaceAdd');case 1:case"end":return _context2.stop();}}});};exports.rnvWorkspaceAdd=rnvWorkspaceAdd;


var rnvWorkspaceConnect=function rnvWorkspaceConnect(c){return _regenerator.default.async(function rnvWorkspaceConnect$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:
(0,_logger.logTask)('rnvWorkspaceConnect');case 1:case"end":return _context3.stop();}}});};exports.rnvWorkspaceConnect=rnvWorkspaceConnect;


var rnvWorkspaceUpdate=function rnvWorkspaceUpdate(c){return _regenerator.default.async(function rnvWorkspaceUpdate$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:
(0,_logger.logTask)('rnvWorkspaceUpdate');case 1:case"end":return _context4.stop();}}});};exports.rnvWorkspaceUpdate=rnvWorkspaceUpdate;



var getWorkspaceOptions=function getWorkspaceOptions(c){var _c$files$rnv$configWo2;return(0,_prompt.generateOptions)((_c$files$rnv$configWo2=c.files.rnv.configWorkspaces)==null?void 0:_c$files$rnv$configWo2.workspaces,false,null,function(i,obj,mapping,defaultVal){return" ["+_chalk.default.grey(i+1)+"]> "+_chalk.default.bold(defaultVal)+"\n";});};exports.getWorkspaceOptions=getWorkspaceOptions;