"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const path = require("path");
const cli_utils_1 = require("@ionic/cli-utils");
function getProjectPlatforms(projectDir) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        return cli_utils_1.readDir(path.join(projectDir, 'platforms'));
    });
}
exports.getProjectPlatforms = getProjectPlatforms;
function getProjectPlugins(projectDir) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        return cli_utils_1.readDir(path.join(projectDir, 'plugins'));
    });
}
exports.getProjectPlugins = getProjectPlugins;
function installPlatform(env, platform) {
    return env.shell.run('cordova', ['platform', 'add', '--save', platform], {});
}
exports.installPlatform = installPlatform;
