"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const enums_1 = require("./lib/enums");
const android_controller_1 = require("./lib/android-controller");
const ios_controller_1 = require("./lib/ios-controller");
const device_controller_1 = require("./lib/device-controller");
var enums_2 = require("./lib/enums");
exports.Platform = enums_2.Platform;
exports.DeviceType = enums_2.DeviceType;
exports.Status = enums_2.Status;
exports.AndroidKeyEvent = enums_2.AndroidKeyEvent;
var device_1 = require("./lib/device");
exports.Device = device_1.Device;
var android_controller_2 = require("./lib/android-controller");
exports.AndroidController = android_controller_2.AndroidController;
exports.AndroidDevice = android_controller_2.AndroidDevice;
var ios_controller_2 = require("./lib/ios-controller");
exports.IOSController = ios_controller_2.IOSController;
exports.IOSDevice = ios_controller_2.IOSDevice;
var device_controller_2 = require("./lib/device-controller");
exports.DeviceController = device_controller_2.DeviceController;
function getAndroidDevices(verbose = false) {
    return __awaiter(this, void 0, void 0, function* () {
        yield android_controller_1.AndroidController.getAllDevices(verbose);
    });
}
exports.getAndroidDevices = getAndroidDevices;
function getIOSDevices() {
    return __awaiter(this, void 0, void 0, function* () {
        yield ios_controller_1.IOSController.getAllDevices();
    });
}
exports.getIOSDevices = getIOSDevices;
function getDevices(platform) {
    return __awaiter(this, void 0, void 0, function* () {
        yield device_controller_1.DeviceController.getDevices({ platform: platform });
    });
}
exports.getDevices = getDevices;
function startEmulator(emulator, options) {
    return __awaiter(this, void 0, void 0, function* () {
        yield android_controller_1.AndroidController.startEmulator(emulator, options);
    });
}
exports.startEmulator = startEmulator;
function startSimulator(simulator, options) {
    return __awaiter(this, void 0, void 0, function* () {
        yield ios_controller_1.IOSController.startSimulator(simulator);
    });
}
exports.startSimulator = startSimulator;
function startDevice(device, options) {
    return __awaiter(this, void 0, void 0, function* () {
        yield device_controller_1.DeviceController.startDevice(device, options);
    });
}
exports.startDevice = startDevice;
/**
 * Still not impleneted
 */
function killAllEmulators() {
    android_controller_1.AndroidController.killAll();
}
exports.killAllEmulators = killAllEmulators;
function killAllSimulators() {
    ios_controller_1.IOSController.killAll();
}
exports.killAllSimulators = killAllSimulators;
function killEmulator(emulator) {
    android_controller_1.AndroidController.kill(emulator);
}
exports.killEmulator = killEmulator;
function killSimulator(simulator) {
    ios_controller_1.IOSController.kill(simulator.token);
}
exports.killSimulator = killSimulator;
/**
 * Still not implemented
 */
function restartDevice(device) {
    return __awaiter(this, void 0, void 0, function* () {
        if (device.platform === enums_1.Platform.ANDROID) {
            android_controller_1.AndroidController.restartDevice(device);
        }
        else {
            ios_controller_1.IOSController.restartDevice(device);
        }
    });
}
exports.restartDevice = restartDevice;
//# sourceMappingURL=index.js.map