define("gameProtocolApi", ["clientkernelEventbusApi", "pfCommunicatorApi"],
    function(clientkernelEventbusApi, pfCommunicatorApi) {
        "use strict";

        function $iterator(o) {
            if (o instanceof Array) return function() {
                return {
                    cur: 0,
                    arr: o,
                    hasNext: function() {
                        return this.cur < this.arr.length;
                    },
                    next: function() {
                        return this.arr[this.cur++];
                    }
                };
            };
            return typeof(o.iterator) == 'function' ? $bind(o, o.iterator) : o.iterator;
        };;
        var $fid = 0;

        function $bind(o, m) {
            if (m == null) return null;
            if (m.__id__ == null) m.__id__ = $fid++;
            var f;
            if (o.hx__closures__ == null) o.hx__closures__ = {};
            else f = o.hx__closures__[m.__id__];
            if (f == null) {
                f = function() {
                    return f.method.apply(f.scope, arguments);
                };
                f.scope = o;
                f.method = m;
                o.hx__closures__[m.__id__] = f;
            }
            return f;
        };
        var $_;
        var $estr = function() {
            return _hcmn_.js_Boot.__string_rec(this, '');
        };
        if (typeof gameProtocolApi == 'undefined') {
            var gameProtocolApi = {};
        };

        gameProtocolApi.IGameProtocol = function() {}
        gameProtocolApi.IGameProtocol.prototype = {

            registerServices: function(factory, console, parser, preference) {
                return {
                    arguments: ["*", "*", "*", "*"],
                    returns: "void"
                };
            },
            handleGameLoaded: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            getTestPort: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            deductStake: function(value) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            },
            sendPlayRequest: function(payload) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            sendContinueRequest: function(payload) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            changeConsoleOption: function(name, params) {
                return {
                    arguments: ["string", "array"],
                    returns: "void"
                };
            },
            enableConsoleOptions: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            disableConsoleOptions: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            requestFullScreen: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            nextState: function(payload) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            sendAutoSpinStopped: function(stopReason) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            },
            sendAutoSpinStart: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            getAutoSpinOption: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            sendCecEvent: function(name, params) {
                return {
                    arguments: ["string", "*"],
                    returns: "void"
                };
            },
            updatePreference: function(data) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            }
        };
        gameProtocolApi.TestPort = function(bus) {
            this.selectedPick = new clientkernelEventbusApi.Topic("testable:selectedPick");
            this.availablePicks = new clientkernelEventbusApi.Topic("testable:availablePicks");
            this.gameContinue = new clientkernelEventbusApi.Topic("testable:gameContinue");
            this.gamePaused = new clientkernelEventbusApi.Topic("testable:gamePaused");
            this.gamePauses = new clientkernelEventbusApi.Topic("testable:gamePauses");
            this.gamePauses.connect(bus);
            this.gamePaused.connect(bus);
            this.gameContinue.connect(bus);
            this.availablePicks.connect(bus);
            this.selectedPick.connect(bus);
        };
        gameProtocolApi.TestPort.__name__ = ["gameProtocolApi", "TestPort"];
        gameProtocolApi.TestPort.prototype.gamePauses = null;
        gameProtocolApi.TestPort.prototype.gamePaused = null;
        gameProtocolApi.TestPort.prototype.gameContinue = null;
        gameProtocolApi.TestPort.prototype.availablePicks = null;
        gameProtocolApi.TestPort.prototype.selectedPick = null;
        gameProtocolApi.TestPort.prototype.getGamePauses = function() {
            return this.gamePauses;
        };
        gameProtocolApi.TestPort.prototype.getGamePaused = function() {
            return this.gamePaused;
        };
        gameProtocolApi.TestPort.prototype.getGameContinue = function() {
            return this.gameContinue;
        };
        gameProtocolApi.TestPort.prototype.sendAvailablePicks = function() {
            return this.availablePicks;
        };
        gameProtocolApi.TestPort.prototype.getSelectedPick = function() {
            return this.selectedPick;
        };
        gameProtocolApi.TestPort["use"] = function(channel) {
            return new gameProtocolApi.TestPort(channel);
        };
        gameProtocolApi.TestPort.prototype.__class__ = gameProtocolApi.TestPort;

        gameProtocolApi.ICecService = function() {}
        gameProtocolApi.ICecService.prototype = {

            paytableUsed: function(state) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            },
            helpUsed: function(state) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            },
            tutorialUsed: function(state) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            },
            soundUsed: function(state) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            },
            bonus: function(type, win) {
                return {
                    arguments: ["string", "number"],
                    returns: "void"
                };
            },
            stakeSelected: function(type, name, previousValue, currentValue) {
                return {
                    arguments: ["string", "string", "number", "number"],
                    returns: "void"
                };
            }
        };

        gameProtocolApi.IConsoleService = function() {}
        gameProtocolApi.IConsoleService.prototype = {

            handleAccountBalances: function(balance, promoFreeSpinCount) {
                return {
                    arguments: ["string", "number"],
                    returns: "void"
                };
            },
            handleHelpPageRequested: function(links) {
                return {
                    arguments: ["array"],
                    returns: "void"
                };
            },
            handlePaytablePageRequested: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            handleGameOptionChangedFromPf: function(name, value) {
                return {
                    arguments: ["string", "string"],
                    returns: "void"
                };
            },
            initializeStakeOptions: function(options) {
                return {
                    arguments: ["array"],
                    returns: "*"
                };
            },
            changeStakeOptions: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            handleStopAutospin: function(e) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleBetPerLineChanged: function(value) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            },
            handleSelectedLinesChanged: function(value) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            }
        };

        gameProtocolApi.IParserServices = function() {}
        gameProtocolApi.IParserServices.prototype = {

            parseInitPayload: function(gameInitPayload, gameConfigJson) {
                return {
                    arguments: ["*", "*"],
                    returns: "void"
                };
            }
        };

        gameProtocolApi.IPreferenceService = function() {}
        gameProtocolApi.IPreferenceService.prototype = {

            initData: function(data) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            updateData: function(name, data) {
                return {
                    arguments: ["string", "*"],
                    returns: "void"
                };
            }
        };

        gameProtocolApi.IStrategyFactory = function() {}
        gameProtocolApi.IStrategyFactory.prototype = {

            create: function(nextStage) {
                return {
                    arguments: ["string"],
                    returns: "*"
                };
            },
            getStrategy: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };

        gameProtocolApi.IStrategyServices = function() {}
        gameProtocolApi.IStrategyServices.prototype = {

            handleOnBeforeShowStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnStartGameInitial: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnBeginNewGame: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnStartGameInProgressStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnStartGameInProgressNextStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnBeforeRequest: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnMakeRequest: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnResolveStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnEndGame: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnAbortNextStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnResetNextStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnExitStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnEnterNextStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            handleOnInProgressStage: function(event) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            onGameRequestedSpin: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            getCurrentStage: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };
        gameProtocolApi.StrategyStages = {
            __ename__: ["gameProtocolApi", "StrategyStages"],
            __constructs__: ["BEFORE_SHOW", "START_GAME_IN_PROGRESS", "START_GAME_IN_PROGRESS_NEXT", "START_GAME_INITIAL", "BEFORE_REQUEST", "MAKE_REQUEST", "RESOLVE", "ABORT_NEXT", "IN_PROGRESS", "EXIT", "RESET_NEXT", "ENTER_NEXT", "END_GAME", "BEGIN_NEW_GAME"]
        };
        gameProtocolApi.StrategyStages.BEFORE_REQUEST = ["BEFORE_REQUEST", 4];
        gameProtocolApi.StrategyStages.BEFORE_REQUEST.toString = $estr;
        gameProtocolApi.StrategyStages.BEFORE_REQUEST.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.BEFORE_SHOW = ["BEFORE_SHOW", 0];
        gameProtocolApi.StrategyStages.BEFORE_SHOW.toString = $estr;
        gameProtocolApi.StrategyStages.BEFORE_SHOW.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.START_GAME_INITIAL = ["START_GAME_INITIAL", 3];
        gameProtocolApi.StrategyStages.START_GAME_INITIAL.toString = $estr;
        gameProtocolApi.StrategyStages.START_GAME_INITIAL.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.START_GAME_IN_PROGRESS_NEXT = ["START_GAME_IN_PROGRESS_NEXT", 2];
        gameProtocolApi.StrategyStages.START_GAME_IN_PROGRESS_NEXT.toString = $estr;
        gameProtocolApi.StrategyStages.START_GAME_IN_PROGRESS_NEXT.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.RESET_NEXT = ["RESET_NEXT", 10];
        gameProtocolApi.StrategyStages.RESET_NEXT.toString = $estr;
        gameProtocolApi.StrategyStages.RESET_NEXT.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.START_GAME_IN_PROGRESS = ["START_GAME_IN_PROGRESS", 1];
        gameProtocolApi.StrategyStages.START_GAME_IN_PROGRESS.toString = $estr;
        gameProtocolApi.StrategyStages.START_GAME_IN_PROGRESS.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.END_GAME = ["END_GAME", 12];
        gameProtocolApi.StrategyStages.END_GAME.toString = $estr;
        gameProtocolApi.StrategyStages.END_GAME.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.MAKE_REQUEST = ["MAKE_REQUEST", 5];
        gameProtocolApi.StrategyStages.MAKE_REQUEST.toString = $estr;
        gameProtocolApi.StrategyStages.MAKE_REQUEST.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.ABORT_NEXT = ["ABORT_NEXT", 7];
        gameProtocolApi.StrategyStages.ABORT_NEXT.toString = $estr;
        gameProtocolApi.StrategyStages.ABORT_NEXT.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.IN_PROGRESS = ["IN_PROGRESS", 8];
        gameProtocolApi.StrategyStages.IN_PROGRESS.toString = $estr;
        gameProtocolApi.StrategyStages.IN_PROGRESS.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.RESOLVE = ["RESOLVE", 6];
        gameProtocolApi.StrategyStages.RESOLVE.toString = $estr;
        gameProtocolApi.StrategyStages.RESOLVE.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.ENTER_NEXT = ["ENTER_NEXT", 11];
        gameProtocolApi.StrategyStages.ENTER_NEXT.toString = $estr;
        gameProtocolApi.StrategyStages.ENTER_NEXT.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.BEGIN_NEW_GAME = ["BEGIN_NEW_GAME", 13];
        gameProtocolApi.StrategyStages.BEGIN_NEW_GAME.toString = $estr;
        gameProtocolApi.StrategyStages.BEGIN_NEW_GAME.__enum__ = gameProtocolApi.StrategyStages;
        gameProtocolApi.StrategyStages.EXIT = ["EXIT", 9];
        gameProtocolApi.StrategyStages.EXIT.toString = $estr;
        gameProtocolApi.StrategyStages.EXIT.__enum__ = gameProtocolApi.StrategyStages;
        return {
            exports: gameProtocolApi
        };
    });
//# sourceURL=gameProtocolApi.js