"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var WidgetBase_1 = require("@dojo/framework/core/WidgetBase");
var vdom_1 = require("@dojo/framework/core/vdom");
var I18n_1 = require("@dojo/framework/core/mixins/I18n");
var Themed_1 = require("@dojo/framework/core/mixins/Themed");
var Grid_1 = require("./nls/Grid");
var css = require("../theme/default/grid-footer.m.css");
var Footer = /** @class */ (function (_super) {
    tslib_1.__extends(Footer, _super);
    function Footer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Footer.prototype.render = function () {
        var _a = this.properties, total = _a.total, page = _a.page, pageSize = _a.pageSize;
        var format = this.localizeBundle(Grid_1.default).format;
        var footer = total !== undefined
            ? format('pageOfTotal', {
                page: page,
                totalPages: Math.ceil(total / pageSize),
                totalRows: total
            })
            : format('pageOfUnknownTotal', { page: page });
        return vdom_1.v('div', { classes: this.theme(css.root) }, [footer]);
    };
    Footer = tslib_1.__decorate([
        Themed_1.theme(css)
    ], Footer);
    return Footer;
}(I18n_1.default(Themed_1.default(WidgetBase_1.default))));
exports.default = Footer;

/*# sourceMappingURL=Footer.js.map*/