define("smashthepigComponentsBackgroundPort", ["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 smashthepigComponentsBackgroundPort == 'undefined') {
            var smashthepigComponentsBackgroundPort = {};
        };
        smashthepigComponentsBackgroundPort.BackgroundDeclaration = function() {};
        smashthepigComponentsBackgroundPort.BackgroundDeclaration = ck_implements(smashthepigComponentsBackgroundPort.BackgroundDeclaration, componentmodelComponentApi.IComponentDeclaration);
        smashthepigComponentsBackgroundPort.BackgroundDeclaration.__interfaces__ = [componentmodelComponentApi.IComponentDeclaration];
        smashthepigComponentsBackgroundPort.BackgroundDeclaration.__name__ = ["smashthepigComponentsBackgroundPort", "BackgroundDeclaration"];
        smashthepigComponentsBackgroundPort.BackgroundDeclaration.prototype.getChildComponents = function() {
            return null;
        };
        smashthepigComponentsBackgroundPort.BackgroundDeclaration.prototype.getReferredComponents = function() {
            return null;
        };
        smashthepigComponentsBackgroundPort.BackgroundDeclaration.prototype.getImplementedPorts = function() {
            return [smashthepigComponentsBackgroundPort.IBackgroundImplementationPort];
        };
        smashthepigComponentsBackgroundPort.BackgroundDeclaration.prototype.getUsedPorts = function() {
            return [gameLayoutApi.IGameLayoutPort];
        };
        smashthepigComponentsBackgroundPort.BackgroundDeclaration.prototype.__class__ = smashthepigComponentsBackgroundPort.BackgroundDeclaration;

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

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

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

            getChange: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getChanged: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            prepareBackground: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };
        smashthepigComponentsBackgroundPort.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);
        };
        smashthepigComponentsBackgroundPort.BackgroundPort = ck_implements(smashthepigComponentsBackgroundPort.BackgroundPort, smashthepigComponentsBackgroundPort.IBackgroundPort);
        smashthepigComponentsBackgroundPort.BackgroundPort = ck_implements(smashthepigComponentsBackgroundPort.BackgroundPort, smashthepigComponentsBackgroundPort.IBackgroundImplementationPort);
        smashthepigComponentsBackgroundPort.BackgroundPort.__interfaces__ = [smashthepigComponentsBackgroundPort.IBackgroundPort, smashthepigComponentsBackgroundPort.IBackgroundImplementationPort];
        smashthepigComponentsBackgroundPort.BackgroundPort.__name__ = ["smashthepigComponentsBackgroundPort", "BackgroundPort"];
        smashthepigComponentsBackgroundPort.BackgroundPort.prototype.change = null;
        smashthepigComponentsBackgroundPort.BackgroundPort.prototype.changed = null;
        smashthepigComponentsBackgroundPort.BackgroundPort.prototype.prepareBgd = null;
        smashthepigComponentsBackgroundPort.BackgroundPort.prototype.getChange = function() {
            return this.change;
        };
        smashthepigComponentsBackgroundPort.BackgroundPort.prototype.getChanged = function() {
            return this.changed;
        };
        smashthepigComponentsBackgroundPort.BackgroundPort.prototype.prepareBackground = function() {
            return this.prepareBgd;
        };
        smashthepigComponentsBackgroundPort.BackgroundPort.prototype.__class__ = smashthepigComponentsBackgroundPort.BackgroundPort;
        smashthepigComponentsBackgroundPort.BackgroundPortFactory = function() {};
        smashthepigComponentsBackgroundPort.BackgroundPortFactory = ck_implements(smashthepigComponentsBackgroundPort.BackgroundPortFactory, componentmodelComponentApi.IPortFactory);
        smashthepigComponentsBackgroundPort.BackgroundPortFactory.__interfaces__ = [componentmodelComponentApi.IPortFactory];
        smashthepigComponentsBackgroundPort.BackgroundPortFactory.__name__ = ["smashthepigComponentsBackgroundPort", "BackgroundPortFactory"];
        smashthepigComponentsBackgroundPort.BackgroundPortFactory.prototype.provide = function(channel) {
            return new smashthepigComponentsBackgroundPort.BackgroundPort(channel);
        };
        smashthepigComponentsBackgroundPort.BackgroundPortFactory.prototype["use"] = function(channel) {
            return new smashthepigComponentsBackgroundPort.BackgroundPort(channel);
        };
        smashthepigComponentsBackgroundPort.BackgroundPortFactory.prototype.__class__ = smashthepigComponentsBackgroundPort.BackgroundPortFactory;
        smashthepigComponentsBackgroundPort.ChangeBackgroundPayload = function(image_no, fade) {
            if (fade == null) fade = true;
            this.image_no = image_no;
            this.fade = fade;
        };
        smashthepigComponentsBackgroundPort.ChangeBackgroundPayload.__name__ = ["smashthepigComponentsBackgroundPort", "ChangeBackgroundPayload"];
        smashthepigComponentsBackgroundPort.ChangeBackgroundPayload.prototype.image_no = null;
        smashthepigComponentsBackgroundPort.ChangeBackgroundPayload.prototype.fade = null;
        smashthepigComponentsBackgroundPort.ChangeBackgroundPayload.prototype.__class__ = smashthepigComponentsBackgroundPort.ChangeBackgroundPayload;
        return {
            exports: smashthepigComponentsBackgroundPort
        };
    });
//# sourceURL=smashThePigBackgroundPort.js