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

        gameLayoutApi.IGameLayoutPort = function() {}
        gameLayoutApi.IGameLayoutPort.prototype = {

            getUpdateComponentLayout: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getComponentLayoutUpdated: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getGameLayoutUpdated: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getGameLayoutUpdateStarted: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getCacheLayers: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getUncacheLayers: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getHideLayers: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getUnhideLayers: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };

        gameLayoutApi.IGameLayoutImplementationPort = function() {}
        gameLayoutApi.IGameLayoutImplementationPort.prototype = {

            getUpdateComponentLayout: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getComponentLayoutUpdated: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getGameLayoutUpdated: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getGameLayoutUpdateStarted: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getCacheLayers: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getUncacheLayers: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getHideLayers: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getUnhideLayers: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };
        gameLayoutApi.GameLayoutPort = function(instance, bus) {
            this.unhideLayers = new clientkernelEventbusApi.Topic("gamelayout:unhideLayers");
            this.hideLayers = new clientkernelEventbusApi.Topic("gamelayout:hideLayers");
            this.uncacheLayers = new clientkernelEventbusApi.Topic("gamelayout:uncacheLayers");
            this.cacheLayers = new clientkernelEventbusApi.Topic("gamelayout:cacheLayers");
            this.gameLayoutUpdateStarted = new clientkernelEventbusApi.Topic("gamelayout:gamelayoutupdatestarted");
            this.gameLayoutUpdated = new clientkernelEventbusApi.Topic("gamelayout:gamelayoutupdated");
            this.componentLayoutUpdated = new clientkernelEventbusApi.Topic("gamelayout:componentlayoutupdated");
            this.updateComponentLayout = instance.createTopic("gamelayout:updatecomponentlayout");
            this.updateComponentLayout.connect(bus);
            this.componentLayoutUpdated.connect(bus);
            this.gameLayoutUpdated.connect(bus);
            this.gameLayoutUpdateStarted.connect(bus);
            this.cacheLayers.connect(bus);
            this.uncacheLayers.connect(bus);
            this.hideLayers.connect(bus);
            this.unhideLayers.connect(bus);
        };
        gameLayoutApi.GameLayoutPort = ck_implements(gameLayoutApi.GameLayoutPort, gameLayoutApi.IGameLayoutPort);
        gameLayoutApi.GameLayoutPort = ck_implements(gameLayoutApi.GameLayoutPort, gameLayoutApi.IGameLayoutImplementationPort);
        gameLayoutApi.GameLayoutPort.__interfaces__ = [gameLayoutApi.IGameLayoutPort, gameLayoutApi.IGameLayoutImplementationPort];
        gameLayoutApi.GameLayoutPort.__name__ = ["gameLayoutApi", "GameLayoutPort"];
        gameLayoutApi.GameLayoutPort.prototype.updateComponentLayout = null;
        gameLayoutApi.GameLayoutPort.prototype.componentLayoutUpdated = null;
        gameLayoutApi.GameLayoutPort.prototype.gameLayoutUpdated = null;
        gameLayoutApi.GameLayoutPort.prototype.gameLayoutUpdateStarted = null;
        gameLayoutApi.GameLayoutPort.prototype.cacheLayers = null;
        gameLayoutApi.GameLayoutPort.prototype.uncacheLayers = null;
        gameLayoutApi.GameLayoutPort.prototype.hideLayers = null;
        gameLayoutApi.GameLayoutPort.prototype.unhideLayers = null;
        gameLayoutApi.GameLayoutPort.prototype.getUpdateComponentLayout = function() {
            return this.updateComponentLayout;
        };
        gameLayoutApi.GameLayoutPort.prototype.getComponentLayoutUpdated = function() {
            return this.componentLayoutUpdated;
        };
        gameLayoutApi.GameLayoutPort.prototype.getGameLayoutUpdated = function() {
            return this.gameLayoutUpdated;
        };
        gameLayoutApi.GameLayoutPort.prototype.getGameLayoutUpdateStarted = function() {
            return this.gameLayoutUpdateStarted;
        };
        gameLayoutApi.GameLayoutPort.prototype.getCacheLayers = function() {
            return this.cacheLayers;
        };
        gameLayoutApi.GameLayoutPort.prototype.getUncacheLayers = function() {
            return this.uncacheLayers;
        };
        gameLayoutApi.GameLayoutPort.prototype.getHideLayers = function() {
            return this.hideLayers;
        };
        gameLayoutApi.GameLayoutPort.prototype.getUnhideLayers = function() {
            return this.unhideLayers;
        };
        gameLayoutApi.GameLayoutPort.prototype.__class__ = gameLayoutApi.GameLayoutPort;
        gameLayoutApi.GameLayoutPortFactory = function() {};
        gameLayoutApi.GameLayoutPortFactory = ck_implements(gameLayoutApi.GameLayoutPortFactory, componentmodelComponentApi.IComponentPortFactory);
        gameLayoutApi.GameLayoutPortFactory.__interfaces__ = [componentmodelComponentApi.IComponentPortFactory];
        gameLayoutApi.GameLayoutPortFactory.__name__ = ["gameLayoutApi", "GameLayoutPortFactory"];
        gameLayoutApi.GameLayoutPortFactory.prototype.provide = function(instance, channel) {
            return new gameLayoutApi.GameLayoutPort(instance, channel);
        };
        gameLayoutApi.GameLayoutPortFactory.prototype["use"] = function(instance, channel) {
            return new gameLayoutApi.GameLayoutPort(instance, channel);
        };
        gameLayoutApi.GameLayoutPortFactory.prototype.__class__ = gameLayoutApi.GameLayoutPortFactory;
        gameLayoutApi.ComponentLayout = function(containers) {
            this.containers = containers;
        };
        gameLayoutApi.ComponentLayout.__name__ = ["gameLayoutApi", "ComponentLayout"];
        gameLayoutApi.ComponentLayout.prototype.containers = null;
        gameLayoutApi.ComponentLayout.prototype.toJSON = function() {
            return this.containers.keys();
        };
        gameLayoutApi.ComponentLayout.prototype.__class__ = gameLayoutApi.ComponentLayout;
        gameLayoutApi.ContainerLayout = function(id, stage, stageZIndex, left, top, width, height, zIndex, configuration) {
            this.id = id;
            this.stage = stage;
            this.stageZIndex = stageZIndex;
            this.left = left;
            this.top = top;
            this.width = width;
            this.height = height;
            this.zIndex = zIndex;
            this.configuration = configuration;
        };
        gameLayoutApi.ContainerLayout.__name__ = ["gameLayoutApi", "ContainerLayout"];
        gameLayoutApi.ContainerLayout.prototype.id = null;
        gameLayoutApi.ContainerLayout.prototype.top = null;
        gameLayoutApi.ContainerLayout.prototype.left = null;
        gameLayoutApi.ContainerLayout.prototype.height = null;
        gameLayoutApi.ContainerLayout.prototype.width = null;
        gameLayoutApi.ContainerLayout.prototype.zIndex = null;
        gameLayoutApi.ContainerLayout.prototype.stage = null;
        gameLayoutApi.ContainerLayout.prototype.stageZIndex = null;
        gameLayoutApi.ContainerLayout.prototype.configuration = null;
        gameLayoutApi.ContainerLayout.prototype.__class__ = gameLayoutApi.ContainerLayout;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

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