"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var commonOptionsLibPath = require("./common/options");
var osenv = require("osenv");
var path = require("path");
var OptionType = commonOptionsLibPath.OptionType;
var Options = (function (_super) {
    __extends(Options, _super);
    function Options($errors, $staticConfig, $hostInfo) {
        _super.call(this, {
            ipa: { type: OptionType.String },
            frameworkPath: { type: OptionType.String },
            frameworkName: { type: OptionType.String },
            framework: { type: OptionType.String },
            frameworkVersion: { type: OptionType.String },
            copyFrom: { type: OptionType.String },
            linkTo: { type: OptionType.String },
            forDevice: { type: OptionType.Boolean },
            client: { type: OptionType.Boolean, default: true },
            production: { type: OptionType.Boolean },
            debugTransport: { type: OptionType.Boolean },
            keyStorePath: { type: OptionType.String },
            keyStorePassword: { type: OptionType.String, },
            keyStoreAlias: { type: OptionType.String },
            keyStoreAliasPassword: { type: OptionType.String },
            ignoreScripts: { type: OptionType.Boolean },
            disableNpmInstall: { type: OptionType.Boolean },
            tnsModulesVersion: { type: OptionType.String },
            compileSdk: { type: OptionType.Number },
            port: { type: OptionType.Number },
            copyTo: { type: OptionType.String },
            baseConfig: { type: OptionType.String },
            platformTemplate: { type: OptionType.String },
            ng: { type: OptionType.Boolean },
            tsc: { type: OptionType.Boolean },
            androidTypings: { type: OptionType.Boolean },
            bundle: { type: OptionType.Boolean },
            all: { type: OptionType.Boolean },
            teamId: { type: OptionType.String },
            rebuild: { type: OptionType.Boolean, default: true },
            syncAllFiles: { type: OptionType.Boolean },
            liveEdit: { type: OptionType.Boolean },
            chrome: { type: OptionType.Boolean }
        }, path.join($hostInfo.isWindows ? process.env.AppData : path.join(osenv.home(), ".local/share"), ".nativescript-cli"), $errors, $staticConfig);
        if ($hostInfo.isWindows) {
            try {
                var shelljs = require("shelljs"), oldSettings = path.join(process.env.LocalAppData, ".nativescript-cli", "user-settings.json"), newSettings = path.join(process.env.AppData, ".nativescript-cli", "user-settings.json");
                if (shelljs.test("-e", oldSettings) && !shelljs.test("-e", newSettings)) {
                    shelljs.mkdir(path.join(process.env.AppData, ".nativescript-cli"));
                    shelljs.mv(oldSettings, newSettings);
                }
            }
            catch (err) {
            }
        }
    }
    return Options;
}(commonOptionsLibPath.OptionsBase));
exports.Options = Options;
$injector.register("options", Options);
