"use strict";
const os = require("os");
const helpers_1 = require('../helpers');
class DynamicHelpService {
    constructor($dynamicHelpProvider) {
        this.$dynamicHelpProvider = $dynamicHelpProvider;
    }
    isProjectType(...args) {
        return this.$dynamicHelpProvider.isProjectType(args);
    }
    isPlatform(...args) {
        let platform = os.platform().toLowerCase();
        return _.some(args, arg => arg.toLowerCase() === platform);
    }
    getLocalVariables(options) {
        let isHtml = options.isHtml;
        let localVariables = this.$dynamicHelpProvider.getLocalVariables(options);
        localVariables["isLinux"] = isHtml || this.isPlatform("linux");
        localVariables["isWindows"] = isHtml || this.isPlatform("win32");
        localVariables["isMacOS"] = isHtml || this.isPlatform("darwin");
        localVariables["isConsole"] = !isHtml;
        localVariables["isHtml"] = isHtml;
        localVariables["formatListOfNames"] = helpers_1.formatListOfNames;
        return localVariables;
    }
}
exports.DynamicHelpService = DynamicHelpService;
$injector.register("dynamicHelpService", DynamicHelpService);
