"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const constants = require("../constants");
class NativescriptCloudExtensionService {
    constructor($extensibilityService, $logger) {
        this.$extensibilityService = $extensibilityService;
        this.$logger = $logger;
    }
    install() {
        const installedExtensions = this.$extensibilityService.getInstalledExtensions() || {};
        if (!installedExtensions[constants.NATIVESCRIPT_CLOUD_EXTENSION_NAME]) {
            return this.$extensibilityService.installExtension(constants.NATIVESCRIPT_CLOUD_EXTENSION_NAME);
        }
        this.$logger.out(`Extension ${constants.NATIVESCRIPT_CLOUD_EXTENSION_NAME} is already installed.`);
    }
}
exports.NativescriptCloudExtensionService = NativescriptCloudExtensionService;
$injector.register("nativescriptCloudExtensionService", NativescriptCloudExtensionService);
