define(["require", "exports", "../ScreenSizeDetection"], function (require, exports, ScreenSizeDetection_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var NewsController = /** @class */ (function () {
        function NewsController($timeout) {
            this.$timeout = $timeout;
            this.itemsPerPage = 7;
            this.subscribeObservables();
        }
        NewsController.prototype.subscribeObservables = function () {
            var _this = this;
            ScreenSizeDetection_1.default.get().subscribe(function (screensize) {
                _this.screensize = screensize;
                var itemsPerPage;
                if (screensize === 'xs' || screensize === 'sm') {
                    itemsPerPage = 3;
                }
                else {
                    itemsPerPage = 7;
                }
                _this.$timeout(function () {
                    _this.itemsPerPage = itemsPerPage;
                });
            });
        };
        NewsController.prototype.$onInit = function () {
            this.entities = window['news'];
        };
        return NewsController;
    }());
    exports.NewsController = NewsController;
});
//# sourceMappingURL=news.controller.js.map