Object.defineProperty(exports, "__esModule", { value: true });
var MoorenTv_1 = require("./MoorenTv");
module.exports = function (Api) {
    Api.registerAction('startGame', 'Start game', require('./actions/startGame'));
    Api.registerAction('stopGame', 'Stop game', require('./actions/stopGame'));
    Api.registerConnectionValidator('moorentv', function (validatorApi) {
        var _a = validatorApi.properties, serverAddress = _a.serverAddress, serverPort = _a.serverPort, adminPass = _a.adminPass;
        var mtv = new MoorenTv_1.MoorenTV({ serverAddress: serverAddress, serverPort: serverPort, adminPass: adminPass });
        mtv.ping(function (succeed) {
            if (succeed)
                validatorApi.setInstance(mtv);
            validatorApi.callback(succeed, succeed == false ? 'Unable to connect to the MoorenTV instance' : null);
        });
    });
};
//# sourceMappingURL=main.js.map