"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.taskRnvTargetList = exports["default"] = void 0;var _platformManager = require("../../core/platformManager");
var _logger = require("../../core/systemManager/logger");

var _installer = require("../../core/sdkManager/installer");
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 _taskManager = require("../../core/taskManager");function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}


var taskRnvTargetList = /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(c, parentTask, originTask) {var platform;return regeneratorRuntime.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
            (0, _logger.logTask)('taskRnvTargetList');_context.next = 3;return (

              (0, _platformManager.isPlatformSupported)(c, true));case 3:_context.next = 5;return (
              (0, _taskManager.executeTask)(c, _constants.TASK_WORKSPACE_CONFIGURE, _constants.TASK_TARGET_LAUNCH, originTask));case 5:

            platform = c.platform;_context.next = 8;return (

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

            platform;_context.next = _context.t0 ===
            _constants.ANDROID ? 11 : _context.t0 ===
            _constants.ANDROID_TV ? 11 : _context.t0 ===
            _constants.FIRE_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, _android.listAndroidTargets)(c, platform));case 12:return _context.abrupt("return", (0, _apple.listAppleDevices)(c));case 13:return _context.abrupt("return", (0, _tizen.listTizenTargets)(c, platform));case 14:return _context.abrupt("return",
            (0, _webos.listWebOSTargets)(c));case 15:return _context.abrupt("return",

            Promise.reject("\"target list\" command does not support ".concat(
            (0, _logger.chalk)().white.bold(
            platform), " platform yet. Working on it!")));case 16:case "end":return _context.stop();}}}, _callee);}));return function taskRnvTargetList(_x, _x2, _x3) {return _ref.apply(this, arguments);};}();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