"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var React = require("react");
var Utilities_1 = require("../../Utilities");
var Link_1 = require("../../Link");
var GroupSpacer_1 = require("./GroupSpacer");
var GroupFooter_scss_1 = require("./GroupFooter.scss");
var GroupFooter = (function (_super) {
    __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', GroupFooter_scss_1.default.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));
__decorate([
    Utilities_1.autobind
], GroupFooter.prototype, "_onSummarizeClick", null);
exports.GroupFooter = GroupFooter;

//# sourceMappingURL=GroupFooter.js.map
