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 _tizen=require("../../core/sdkManager/deviceUtils/tizen");
var _webos=require("../../core/sdkManager/deviceUtils/webos");
var _android=require("../../core/sdkManager/deviceUtils/android");
var _apple=require("../../core/sdkManager/deviceUtils/apple");
var _kaios=require("../../core/sdkManager/deviceUtils/kaios");
var _taskManager=require("../../core/taskManager");

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,_taskManager.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.FIRE_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,_android.launchAndroidSimulator)(c,target));case 11:return _context.abrupt("return",(0,_apple.launchAppleSimulator)(c,target));case 12:return _context.abrupt("return",(0,_tizen.launchTizenSimulator)(c,target));case 13:return _context.abrupt("return",(0,_webos.launchWebOSimulator)(c,target));case 14:return _context.abrupt("return",
(0,_kaios.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