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

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

            showBackground: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            hideBackground: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };

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

            showBackground: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            hideBackground: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };
        backgroundApi.BackgroundPort = function(bus) {
            this.hide = new clientkernelEventbusApi.Topic("genericbackground:hide");
            this.show = new clientkernelEventbusApi.Topic("genericbackground:show");
            this.show.connect(bus);
            this.hide.connect(bus);
        };
        backgroundApi.BackgroundPort = ck_implements(backgroundApi.BackgroundPort, backgroundApi.IBackgroundPort);
        backgroundApi.BackgroundPort = ck_implements(backgroundApi.BackgroundPort, backgroundApi.IBackgroundImplementationPort);
        backgroundApi.BackgroundPort.__interfaces__ = [backgroundApi.IBackgroundPort, backgroundApi.IBackgroundImplementationPort];
        backgroundApi.BackgroundPort.__name__ = ["backgroundApi", "BackgroundPort"];
        backgroundApi.BackgroundPort.prototype.show = null;
        backgroundApi.BackgroundPort.prototype.hide = null;
        backgroundApi.BackgroundPort.prototype.showBackground = function() {
            return this.show;
        };
        backgroundApi.BackgroundPort.prototype.hideBackground = function() {
            return this.hide;
        };
        backgroundApi.BackgroundPort.prototype.__class__ = backgroundApi.BackgroundPort;
        backgroundApi.BackgroundPortFactory = function() {};
        backgroundApi.BackgroundPortFactory = ck_implements(backgroundApi.BackgroundPortFactory, componentmodelComponentApi.IPortFactory);
        backgroundApi.BackgroundPortFactory.__interfaces__ = [componentmodelComponentApi.IPortFactory];
        backgroundApi.BackgroundPortFactory.__name__ = ["backgroundApi", "BackgroundPortFactory"];
        backgroundApi.BackgroundPortFactory.prototype.provide = function(channel) {
            return new backgroundApi.BackgroundPort(channel);
        };
        backgroundApi.BackgroundPortFactory.prototype["use"] = function(channel) {
            return new backgroundApi.BackgroundPort(channel);
        };
        backgroundApi.BackgroundPortFactory.prototype.__class__ = backgroundApi.BackgroundPortFactory;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

        };
        return {
            exports: backgroundApi
        };
    });
//# sourceURL=genericBackgroundApi.js