"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var Utilities_1 = require("../../Utilities");
var Link_1 = require("../../Link");
var GroupSpacer_1 = require("./GroupSpacer");
var stylesImport = require("./GroupFooter.scss");
var styles = stylesImport;
var GroupFooter = (function (_super) {
    tslib_1.__extends(GroupFooter, _super);
    function GroupFooter() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    GroupFooter.prototype.render = function () {
        var _a = this.props, group = _a.group, groupLevel = _a.groupLevel, showAllLinkText = _a.showAllLinkText;
        return group && (React.createElement("div", { className: Utilities_1.css('ms-groupFooter', styles.root) },
            GroupSpacer_1.GroupSpacer({ count: groupLevel }),
            React.createElement(Link_1.Link, { onClick: this._onSummarizeClick }, showAllLinkText)));
    };
    GroupFooter.prototype._onSummarizeClick = function (ev) {
        this.props.onToggleSummarize(this.props.group);
        ev.stopPropagation();
        ev.preventDefault();
    };
    return GroupFooter;
}(Utilities_1.BaseComponent));
tslib_1.__decorate([
    Utilities_1.autobind
], GroupFooter.prototype, "_onSummarizeClick", null);
exports.GroupFooter = GroupFooter;

//# sourceMappingURL=GroupFooter.js.map
