Object.defineProperty(exports, "__esModule", { value: true });
var axios_1 = require("axios");
module.exports = function (api) {
    api.registerAction('overview', 'Show slide overview', require('./actions/overview'));
    api.registerAction('previous', 'Previous slide', require('./actions/previous'));
    api.registerAction('next', 'Next slide', require('./actions/next'));
    api.registerConnectionValidator('powerpoint-bridge', function (validatorAPI) {
        if (validatorAPI.properties.ip != undefined && validatorAPI.properties.port != undefined) {
            axios_1.default
                .get("http://".concat(validatorAPI.properties.ip, ":").concat(validatorAPI.properties.port, "/v1/ping"))
                .then(function () {
                validatorAPI.callback(true);
            })
                .catch(function () {
                validatorAPI.callback(false, 'Unable to reach Powerpoint-Bridge');
            });
        }
        else
            validatorAPI.callback(false, 'No ip or port specified');
    });
};
//# sourceMappingURL=powerpoint.js.map