define("PickerApi", ["componentmodelComponentApi", "gameLayoutApi", "clientkernelEventbusApi"],
    function(componentmodelComponentApi, gameLayoutApi, clientkernelEventbusApi) {
        "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 PickerApi == 'undefined') {
            var PickerApi = {};
        };

        PickerApi.IPickerImplementationPort = function() {}
        PickerApi.IPickerImplementationPort.prototype = {

            getHide: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getStop: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getStart: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getIdle: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getInitWheelStrips: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getShow: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getWheelStopped: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getWheelStarted: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getSpinBtnPressed: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getActivateSpin: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getDeactivateSpin: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            isResume: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };

        PickerApi.IPickerPort = function() {}
        PickerApi.IPickerPort.prototype = {

            initWheelStrips: function(values) {
                return {
                    arguments: ["array"],
                    returns: "void"
                };
            },
            show: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            setIdle: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            start: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            stop: function(data) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            hide: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            getWheelStopped: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getWheelStarted: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            activateSpin: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            deactivateSpin: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            onSpinPressed: function(calbackFunction) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            isResume: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };
        PickerApi.PickerDeclaration = function() {};
        PickerApi.PickerDeclaration = ck_implements(PickerApi.PickerDeclaration, componentmodelComponentApi.IComponentDeclaration);
        PickerApi.PickerDeclaration.__interfaces__ = [componentmodelComponentApi.IComponentDeclaration];
        PickerApi.PickerDeclaration.__name__ = ["PickerApi", "PickerDeclaration"];
        PickerApi.PickerDeclaration.prototype.getChildComponents = function() {
            return null;
        };
        PickerApi.PickerDeclaration.prototype.getReferredComponents = function() {
            return null;
        };
        PickerApi.PickerDeclaration.prototype.getImplementedPorts = function() {
            return [PickerApi.IPickerImplementationPort];
        };
        PickerApi.PickerDeclaration.prototype.getUsedPorts = function() {
            return [PickerApi.IPickerPort, gameLayoutApi.IGameLayoutPort];
        };
        PickerApi.PickerDeclaration.prototype.__class__ = PickerApi.PickerDeclaration;
        PickerApi.PickerPortFactory = function() {};
        PickerApi.PickerPortFactory = ck_implements(PickerApi.PickerPortFactory, componentmodelComponentApi.IPortFactory);
        PickerApi.PickerPortFactory.__interfaces__ = [componentmodelComponentApi.IPortFactory];
        PickerApi.PickerPortFactory.__name__ = ["PickerApi", "PickerPortFactory"];
        PickerApi.PickerPortFactory.prototype.provide = function(channel) {
            return new PickerApi.PickerPortImpl(channel);
        };
        PickerApi.PickerPortFactory.prototype["use"] = function(channel) {
            return new PickerApi.PickerPortImpl(channel);
        };
        PickerApi.PickerPortFactory.prototype.__class__ = PickerApi.PickerPortFactory;
        PickerApi.PickerPortImpl = function(bus) {
            this.isResumeTopic = new clientkernelEventbusApi.Topic("Picker:isResumeTopic");
            this.spinBtnPressedTopic = new clientkernelEventbusApi.Topic("Picker:spinBtnPressedTopic");
            this.deactivateSpinTopic = new clientkernelEventbusApi.Topic("Picker:deactivateSpin");
            this.activateSpinTopic = new clientkernelEventbusApi.Topic("Picker:activateSpin");
            this.idleTopic = new clientkernelEventbusApi.Topic("Picker:idle");
            this.showTopic = new clientkernelEventbusApi.Topic("Picker:show");
            this.initWheelStripsTopic = new clientkernelEventbusApi.Topic("Picker:initWheelStrips");
            this.wheelStartedTopic = new clientkernelEventbusApi.Topic("Picker:wheelStarted");
            this.wheelStoppedTopic = new clientkernelEventbusApi.Topic("Picker:wheelStopped");
            this.hideTopic = new clientkernelEventbusApi.Topic("Picker:hide");
            this.availablePickAutoTestTopic = new clientkernelEventbusApi.Topic("multipicker:availablePicks");
            this.startWheelTopic = new clientkernelEventbusApi.Topic("multipicker:choice");
            this.stopWheelTopic = new clientkernelEventbusApi.Topic("Picker:stopWheel");
            this.stopWheelTopic.connect(bus);
            this.hideTopic.connect(bus);
            this.showTopic.connect(bus);
            this.initWheelStripsTopic.connect(bus);
            this.idleTopic.connect(bus);
            this.wheelStoppedTopic.connect(bus);
            this.wheelStartedTopic.connect(bus);
            this.activateSpinTopic.connect(bus);
            this.deactivateSpinTopic.connect(bus);
            this.startWheelTopic.connect(bus);
            this.availablePickAutoTestTopic.connect(bus);
            this.spinBtnPressedTopic.connect(bus);
            this.isResumeTopic.connect(bus);
        };
        PickerApi.PickerPortImpl = ck_implements(PickerApi.PickerPortImpl, PickerApi.IPickerPort);
        PickerApi.PickerPortImpl = ck_implements(PickerApi.PickerPortImpl, PickerApi.IPickerImplementationPort);
        PickerApi.PickerPortImpl.__interfaces__ = [PickerApi.IPickerPort, PickerApi.IPickerImplementationPort];
        PickerApi.PickerPortImpl.__name__ = ["PickerApi", "PickerPortImpl"];
        PickerApi.PickerPortImpl.prototype.stopWheelTopic = null;
        PickerApi.PickerPortImpl.prototype.startWheelTopic = null;
        PickerApi.PickerPortImpl.prototype.availablePickAutoTestTopic = null;
        PickerApi.PickerPortImpl.prototype.hideTopic = null;
        PickerApi.PickerPortImpl.prototype.wheelStoppedTopic = null;
        PickerApi.PickerPortImpl.prototype.wheelStartedTopic = null;
        PickerApi.PickerPortImpl.prototype.initWheelStripsTopic = null;
        PickerApi.PickerPortImpl.prototype.showTopic = null;
        PickerApi.PickerPortImpl.prototype.idleTopic = null;
        PickerApi.PickerPortImpl.prototype.activateSpinTopic = null;
        PickerApi.PickerPortImpl.prototype.deactivateSpinTopic = null;
        PickerApi.PickerPortImpl.prototype.spinBtnPressedTopic = null;
        PickerApi.PickerPortImpl.prototype.isResumeTopic = null;
        PickerApi.PickerPortImpl.prototype.show = function() {
            this.publishAvailablePicksForAutoTest();
            this.getShow().publish(null);
        };
        PickerApi.PickerPortImpl.prototype.initWheelStrips = function(payload) {
            this.getInitWheelStrips().publish(payload);
        };
        PickerApi.PickerPortImpl.prototype.publishAvailablePicksForAutoTest = function() {
            this.availablePickAutoTestTopic.publish({
                'instanceId': "",
                'availablePicks': {
                    'h': {
                        '1': true
                    }
                }
            });
        };
        PickerApi.PickerPortImpl.prototype.setIdle = function() {
            this.getIdle().publish(null);
        };
        PickerApi.PickerPortImpl.prototype.stop = function(payload) {
            this.getStop().publish(payload);
        };
        PickerApi.PickerPortImpl.prototype.start = function() {
            this.getStart().publish({
                'instanceId': "",
                'playerChoice': 1
            });
        };
        PickerApi.PickerPortImpl.prototype.hide = function() {
            this.getHide().publish(null);
        };
        PickerApi.PickerPortImpl.prototype.activateSpin = function() {
            this.getActivateSpin().publish(null);
        };
        PickerApi.PickerPortImpl.prototype.onSpinPressed = function(calbackFunction) {
            this.getSpinBtnPressed().subscribe(function(callback) {
                calbackFunction();
            });
        };
        PickerApi.PickerPortImpl.prototype.deactivateSpin = function() {
            this.getDeactivateSpin().publish(null);
        };
        PickerApi.PickerPortImpl.prototype.getStop = function() {
            return this.stopWheelTopic;
        };
        PickerApi.PickerPortImpl.prototype.getStart = function() {
            return this.startWheelTopic;
        };
        PickerApi.PickerPortImpl.prototype.getShow = function() {
            return this.showTopic;
        };
        PickerApi.PickerPortImpl.prototype.getInitWheelStrips = function() {
            return this.initWheelStripsTopic;
        };
        PickerApi.PickerPortImpl.prototype.getIdle = function() {
            return this.idleTopic;
        };
        PickerApi.PickerPortImpl.prototype.getHide = function() {
            return this.hideTopic;
        };
        PickerApi.PickerPortImpl.prototype.getWheelStopped = function() {
            return this.wheelStoppedTopic;
        };
        PickerApi.PickerPortImpl.prototype.getWheelStarted = function() {
            return this.wheelStartedTopic;
        };
        PickerApi.PickerPortImpl.prototype.getActivateSpin = function() {
            return this.activateSpinTopic;
        };
        PickerApi.PickerPortImpl.prototype.getSpinBtnPressed = function() {
            return this.spinBtnPressedTopic;
        };
        PickerApi.PickerPortImpl.prototype.getDeactivateSpin = function() {
            return this.deactivateSpinTopic;
        };
        PickerApi.PickerPortImpl.prototype.isResume = function() {
            return this.isResumeTopic;
        };
        PickerApi.PickerPortImpl.prototype.__class__ = PickerApi.PickerPortImpl;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

        haxe.IMap = function() {}
        haxe.IMap.prototype = {

        };
        return {
            exports: PickerApi
        };
    });
//# sourceURL=wildFuryPickerApi.js