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











var _sdkTizen=require("../sdk-tizen");
var _sdkWebos=require("../sdk-webos");
var _deviceManager=require("../sdk-android/deviceManager");


var _deviceManager2=require("../sdk-xcode/deviceManager");
var _sdkFirefox=require("../sdk-firefox");
var _engineManager=require("../core/engineManager");

var taskRnvTargetLaunch=function taskRnvTargetLaunch(c,parentTask,originTask){var platform,program,target;return _regenerator.default.async(function taskRnvTargetLaunch$(_context){while(1){switch(_context.prev=_context.next){case 0:
(0,_logger.logTask)('taskRnvTargetLaunch');_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,program=c.program;
target=program.target||c.files.workspace.config.defaultTargets[platform];_context.t0=

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

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

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

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

_constants.KAIOS?14:15;break;case 10:return _context.abrupt("return",(0,_deviceManager.launchAndroidSimulator)(c,target));case 11:return _context.abrupt("return",(0,_deviceManager2.launchAppleSimulator)(c,target));case 12:return _context.abrupt("return",(0,_sdkTizen.launchTizenSimulator)(c,target));case 13:return _context.abrupt("return",(0,_sdkWebos.launchWebOSimulator)(c,target));case 14:return _context.abrupt("return",
(0,_sdkFirefox.launchKaiOSSimulator)(c,target));case 15:return _context.abrupt("return",

Promise.reject("\"target launch\" command does not support "+
(0,_logger.chalk)().white.bold(
platform)+" platform yet. You will have to launch the emulator manually. Working on it!"));case 16:case"end":return _context.stop();}}},null,null,null,Promise);};exports.taskRnvTargetLaunch=taskRnvTargetLaunch;var _default=





{
description:'Launch specific emulator',
fn:taskRnvTargetLaunch,
task:'target launch',
params:_constants.PARAMS.withBase(),
platforms:[],
isGlobalScope:true};exports.default=_default;
//# sourceMappingURL=task.rnv.target.launch.js.map