"use strict";
const sys_info_base_1 = require("./common/sys-info-base");
const path = require("path");
class SysInfo extends sys_info_base_1.SysInfoBase {
    constructor($childProcess, $hostInfo, $iTunesValidator, $logger, $winreg, $androidToolsInfo) {
        super($childProcess, $hostInfo, $iTunesValidator, $logger, $winreg);
        this.$childProcess = $childProcess;
        this.$hostInfo = $hostInfo;
        this.$iTunesValidator = $iTunesValidator;
        this.$logger = $logger;
        this.$winreg = $winreg;
        this.$androidToolsInfo = $androidToolsInfo;
    }
    getSysInfo(pathToPackageJson, androidToolsInfo) {
        return (() => {
            let defaultAndroidToolsInfo = {
                pathToAdb: this.$androidToolsInfo.getPathToAdbFromAndroidHome().wait(),
                pathToAndroid: this.$androidToolsInfo.getPathToAndroidExecutable().wait()
            };
            return super.getSysInfo(pathToPackageJson || path.join(__dirname, "..", "package.json"), androidToolsInfo || defaultAndroidToolsInfo).wait();
        }).future()();
    }
}
exports.SysInfo = SysInfo;
$injector.register("sysInfo", SysInfo);
