"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var common_1 = require("../common");
var PATH = common_1.constants.PATH;
var WebSettings = (function () {
    function WebSettings(args) {
        var data = args.data, dir = args.dir;
        this.exists = Boolean(data);
        this.dir = dir;
        this.data = data || {};
    }
    Object.defineProperty(WebSettings.prototype, "port", {
        get: function () {
            return this.data.port || 1234;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(WebSettings.prototype, "entry", {
        get: function () {
            return this.data.entry || PATH.WEB.ENTRY;
        },
        enumerable: true,
        configurable: true
    });
    WebSettings.prototype.out = function (prod) {
        var WEB = PATH.WEB;
        var dir = prod ? WEB.OUT_DIR.PROD : WEB.OUT_DIR.DEV;
        var file = WEB.OUT_FILE;
        return {
            dir: dir,
            file: file,
            path: common_1.fsPath.join(dir, file),
        };
    };
    Object.defineProperty(WebSettings.prototype, "bundlerArgs", {
        get: function () {
            return common_1.toBundlerArgs(this.data.bundle);
        },
        enumerable: true,
        configurable: true
    });
    return WebSettings;
}());
exports.WebSettings = WebSettings;
//# sourceMappingURL=WebSettings.js.map