import * as tslib_1 from "tslib";
// Copyright (C) 2018 Aleksey Melnikov
// z9115011@gmail.com
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,eyJ2ZXJzaW9uIjozLCJmaWxlIj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