var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.taskRnvTargetList=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _platformManager=require("../core/platformManager");
var _logger=require("../core/systemManager/logger");
var _deviceManager=require("../sdk-android/deviceManager");


var _sdkManager=require("../core/sdkManager");
var _constants=require("../core/constants");








var _sdkTizen=require("../sdk-tizen");
var _sdkWebos=require("../sdk-webos");
var _deviceManager2=require("../sdk-xcode/deviceManager");
var _engineManager=require("../core/engineManager");


var taskRnvTargetList=function taskRnvTargetList(c,parentTask,originTask){var platform;return _regenerator.default.async(function taskRnvTargetList$(_context){while(1){switch(_context.prev=_context.next){case 0:
(0,_logger.logTask)('taskRnvTargetList');_context.next=3;return _regenerator.default.awrap(

(0,_platformManager.isPlatformSupported)(c));case 3:_context.next=5;return _regenerator.default.awrap(
(0,_engineManager.executeTask)(c,_constants.TASK_WORKSPACE_CONFIGURE,_constants.TASK_TARGET_LAUNCH,originTask));case 5:

platform=c.platform;_context.next=8;return _regenerator.default.awrap(

(0,_sdkManager.checkSdk)(c));case 8:_context.t0=

platform;_context.next=_context.t0===
_constants.ANDROID?11:_context.t0===
_constants.ANDROID_TV?11:_context.t0===
_constants.ANDROID_WEAR?11:_context.t0===

_constants.IOS?12:_context.t0===
_constants.TVOS?12:_context.t0===

_constants.TIZEN?13:_context.t0===

_constants.WEBOS?14:15;break;case 11:return _context.abrupt("return",(0,_deviceManager.listAndroidTargets)(c,platform));case 12:return _context.abrupt("return",(0,_deviceManager2.listAppleDevices)(c));case 13:return _context.abrupt("return",(0,_sdkTizen.listTizenTargets)(c,platform));case 14:return _context.abrupt("return",
(0,_sdkWebos.listWebOSTargets)(c));case 15:return _context.abrupt("return",

Promise.reject("\"target list\" command does not support "+
(0,_logger.chalk)().white.bold(
platform)+" platform yet. Working on it!"));case 16:case"end":return _context.stop();}}},null,null,null,Promise);};exports.taskRnvTargetList=taskRnvTargetList;var _default=





{
description:'List all available devices / emulators for specific platform',
fn:taskRnvTargetList,
task:'target list',
params:_constants.PARAMS.withBase(),
platforms:[],
isGlobalScope:true};exports.default=_default;
//# sourceMappingURL=task.rnv.target.list.js.map