define("wolfRunComponentsBackgroundPort", ["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 haxe == 'undefined') {
            var haxe = {};
        };

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

        };
        if (typeof wolfRunComponentsBackgroundPort == 'undefined') {
            var wolfRunComponentsBackgroundPort = {};
        };
        wolfRunComponentsBackgroundPort.BackgroundDeclaration = function() {};
        wolfRunComponentsBackgroundPort.BackgroundDeclaration = ck_implements(wolfRunComponentsBackgroundPort.BackgroundDeclaration, componentmodelComponentApi.IComponentDeclaration);
        wolfRunComponentsBackgroundPort.BackgroundDeclaration.__interfaces__ = [componentmodelComponentApi.IComponentDeclaration];
        wolfRunComponentsBackgroundPort.BackgroundDeclaration.__name__ = ["wolfRunComponentsBackgroundPort", "BackgroundDeclaration"];
        wolfRunComponentsBackgroundPort.BackgroundDeclaration.prototype.getChildComponents = function() {
            return null;
        };
        wolfRunComponentsBackgroundPort.BackgroundDeclaration.prototype.getReferredComponents = function() {
            return null;
        };
        wolfRunComponentsBackgroundPort.BackgroundDeclaration.prototype.getImplementedPorts = function() {
            return [wolfRunComponentsBackgroundPort.IBackgroundImplementationPort];
        };
        wolfRunComponentsBackgroundPort.BackgroundDeclaration.prototype.getUsedPorts = function() {
            return [gameLayoutApi.IGameLayoutPort];
        };
        wolfRunComponentsBackgroundPort.BackgroundDeclaration.prototype.__class__ = wolfRunComponentsBackgroundPort.BackgroundDeclaration;

        wolfRunComponentsBackgroundPort.IBackgroundPort = function() {}
        wolfRunComponentsBackgroundPort.IBackgroundPort.prototype = {

            getChange: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getChanged: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            prepareBackground: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };

        wolfRunComponentsBackgroundPort.IBackgroundImplementationPort = function() {}
        wolfRunComponentsBackgroundPort.IBackgroundImplementationPort.prototype = {

            getChange: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getChanged: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            prepareBackground: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };
        wolfRunComponentsBackgroundPort.BackgroundPort = function(bus) {
            this.prepareBgd = new clientkernelEventbusApi.Topic("background:prepare");
            this.changed = new clientkernelEventbusApi.Topic("background:changed");
            this.change = new clientkernelEventbusApi.Topic("background:change");
            this.change.connect(bus);
            this.changed.connect(bus);
            this.prepareBgd.connect(bus);
        };
        wolfRunComponentsBackgroundPort.BackgroundPort = ck_implements(wolfRunComponentsBackgroundPort.BackgroundPort, wolfRunComponentsBackgroundPort.IBackgroundPort);
        wolfRunComponentsBackgroundPort.BackgroundPort = ck_implements(wolfRunComponentsBackgroundPort.BackgroundPort, wolfRunComponentsBackgroundPort.IBackgroundImplementationPort);
        wolfRunComponentsBackgroundPort.BackgroundPort.__interfaces__ = [wolfRunComponentsBackgroundPort.IBackgroundPort, wolfRunComponentsBackgroundPort.IBackgroundImplementationPort];
        wolfRunComponentsBackgroundPort.BackgroundPort.__name__ = ["wolfRunComponentsBackgroundPort", "BackgroundPort"];
        wolfRunComponentsBackgroundPort.BackgroundPort.prototype.change = null;
        wolfRunComponentsBackgroundPort.BackgroundPort.prototype.changed = null;
        wolfRunComponentsBackgroundPort.BackgroundPort.prototype.prepareBgd = null;
        wolfRunComponentsBackgroundPort.BackgroundPort.prototype.getChange = function() {
            return this.change;
        };
        wolfRunComponentsBackgroundPort.BackgroundPort.prototype.getChanged = function() {
            return this.changed;
        };
        wolfRunComponentsBackgroundPort.BackgroundPort.prototype.prepareBackground = function() {
            return this.prepareBgd;
        };
        wolfRunComponentsBackgroundPort.BackgroundPort.prototype.__class__ = wolfRunComponentsBackgroundPort.BackgroundPort;
        wolfRunComponentsBackgroundPort.BackgroundPortFactory = function() {};
        wolfRunComponentsBackgroundPort.BackgroundPortFactory = ck_implements(wolfRunComponentsBackgroundPort.BackgroundPortFactory, componentmodelComponentApi.IPortFactory);
        wolfRunComponentsBackgroundPort.BackgroundPortFactory.__interfaces__ = [componentmodelComponentApi.IPortFactory];
        wolfRunComponentsBackgroundPort.BackgroundPortFactory.__name__ = ["wolfRunComponentsBackgroundPort", "BackgroundPortFactory"];
        wolfRunComponentsBackgroundPort.BackgroundPortFactory.prototype.provide = function(channel) {
            return new wolfRunComponentsBackgroundPort.BackgroundPort(channel);
        };
        wolfRunComponentsBackgroundPort.BackgroundPortFactory.prototype["use"] = function(channel) {
            return new wolfRunComponentsBackgroundPort.BackgroundPort(channel);
        };
        wolfRunComponentsBackgroundPort.BackgroundPortFactory.prototype.__class__ = wolfRunComponentsBackgroundPort.BackgroundPortFactory;
        wolfRunComponentsBackgroundPort.ChangeBackgroundPayload = function(image_no, fade) {
            if (fade == null) fade = true;
            this.image_no = image_no;
            this.fade = fade;
        };
        wolfRunComponentsBackgroundPort.ChangeBackgroundPayload.__name__ = ["wolfRunComponentsBackgroundPort", "ChangeBackgroundPayload"];
        wolfRunComponentsBackgroundPort.ChangeBackgroundPayload.prototype.image_no = null;
        wolfRunComponentsBackgroundPort.ChangeBackgroundPayload.prototype.fade = null;
        wolfRunComponentsBackgroundPort.ChangeBackgroundPayload.prototype.__class__ = wolfRunComponentsBackgroundPort.ChangeBackgroundPayload;
        return {
            exports: wolfRunComponentsBackgroundPort
        };
    });
//# sourceURL=wolfRunBackgroundPort.js