import * as tslib_1 from "tslib";
/**
 * Copyright (c) 2018-2019 Aleksey Melnikov, True Directive Company.
 * @link https://truedirective.com/
 * @license MIT
*/
import { Component, Input, ElementRef, Inject } from '@angular/core';
// Теперь наше
import { GridStateService } from './grid-state.service';
import { GridLayout } from '@true-directive/base';
import { BaseComponent } from './base.component';
var GridFooterComponent = /** @class */ (function (_super) {
    tslib_1.__extends(GridFooterComponent, _super);
    function GridFooterComponent(state, elementRef) {
        var _this = _super.call(this) || this;
        _this.state = state;
        _this.elementRef = elementRef;
        return _this;
    }
    tslib_1.__decorate([
        Input('layout'),
        tslib_1.__metadata("design:type", GridLayout)
    ], GridFooterComponent.prototype, "layout", void 0);
    GridFooterComponent = tslib_1.__decorate([
        Component({
            selector: 'true-grid-footer',
            template: "<div #gridFooterTable class=\"true-grid-footer\" [ngClass]=\"state.settings.appearance.getFooterClass()\">\r\n  <table [style.width]=\"layout.headerWidth\">\r\n    <colgroup>\r\n      <col *ngFor=\"let c of layout.columns\" [style.width]=\"layout.displayedHeaderWidth(c)\" />\r\n      <col *ngIf=\"layout.isCenter\" class=\"true-grid-re\" [style.width]=\"state.st.hdWidth\" />\r\n    </colgroup>\r\n    <tfoot>\r\n      <tr>\r\n        <td *ngFor=\"let c of layout.columns\"\r\n            [style.height.px]=\"state.settings.rowHeight\"\r\n            [ngClass]=\"state.settings.footerCellClass(c)\">\r\n            <true-grid-footer-cell [column]=\"c\">\r\n            </true-grid-footer-cell>\r\n        </td>\r\n        <td *ngIf=\"layout.isCenter\" style=\"border:0;\"></td>\r\n      </tr>\r\n    </tfoot>\r\n  </table>\r\n</div>\r\n",
            styles: [".true-grid-footer>table{box-sizing:border-box;table-layout:fixed;border-spacing:0;border-collapse:collapse;outline:0}"]
        }),
        tslib_1.__param(0, Inject('gridState')),
        tslib_1.__metadata("design:paramtypes", [GridStateService,
            ElementRef])
    ], GridFooterComponent);
    return GridFooterComponent;
}(BaseComponent));
export { GridFooterComponent };
//# sourceMappingURL=data:application/json;base64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