"use strict";
var _ = require("lodash");
var Rx = require("rxjs");
var dataPager_service_1 = require("./dataPager.service");
var DataPagerOld = (function () {
    function DataPagerOld() {
        this._pageNumber = 1;
        this._pageSize = dataPager_service_1.defaultPageSize;
        this.pageNumberChanges = new Rx.Subject();
        this.pageSizeChanges = new Rx.Subject();
    }
    Object.defineProperty(DataPagerOld.prototype, "pageNumber", {
        get: function () {
            return this._pageNumber;
        },
        set: function (value) {
            this._pageNumber = value;
            this.pageNumberChanges.next(value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DataPagerOld.prototype, "pageSize", {
        get: function () {
            return this._pageSize;
        },
        set: function (value) {
            this._pageSize = value;
            this.pageSizeChanges.next(value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DataPagerOld.prototype, "startItem", {
        get: function () {
            return (this.pageNumber - 1) * this.pageSize;
        },
        enumerable: true,
        configurable: true
    });
    DataPagerOld.prototype.filter = function (dataSet) {
        return _(dataSet)
            .drop(this.startItem)
            .take(this.pageSize)
            .value();
    };
    return DataPagerOld;
}());
exports.DataPagerOld = DataPagerOld;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YVBhZ2VyT2xkLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkYXRhUGFnZXJPbGQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQTRCO0FBQzVCLHlCQUEyQjtBQUUzQix5REFBc0Q7QUFhdEQ7SUFPQztRQU5RLGdCQUFXLEdBQVcsQ0FBQyxDQUFDO1FBQ3hCLGNBQVMsR0FBVyxtQ0FBZSxDQUFDO1FBTTNDLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxJQUFJLEVBQUUsQ0FBQyxPQUFPLEVBQVUsQ0FBQztRQUNsRCxJQUFJLENBQUMsZUFBZSxHQUFHLElBQUksRUFBRSxDQUFDLE9BQU8sRUFBVS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