"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Browser_1 = require("./Browser");
var Executor_1 = require("./Executor");
var util_1 = require("../common/util");
var Dom_1 = require("../reporters/Dom");
var lang_1 = require("@dojo/core/lang");
var Remote = (function (_super) {
    __extends(Remote, _super);
    function Remote(config) {
        var _this = _super.call(this, lang_1.deepMixin(config, {
            reporters: ['dom']
        })) || this;
        _this.registerReporter('dom', Dom_1.default);
        return _this;
    }
    Remote.initialize = function (config) {
        return Executor_1.initialize(Remote, config);
    };
    Remote.prototype._processOption = function (name, value) {
        switch (name) {
            case 'runInSync':
                this._debug = util_1.parseValue(name, value, 'boolean');
                break;
            case 'sessionId':
                this.config[name] = util_1.parseValue(name, value, 'string');
                break;
            case 'socketPort':
                this.config[name] = util_1.parseValue(name, value, 'number');
                break;
            default:
                _super.prototype._processOption.call(this, name, value);
                break;
        }
    };
    return Remote;
}(Browser_1.GenericBrowser));
exports.default = Remote;
//# sourceMappingURL=Remote.js.map