/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input, ViewChildren, QueryList, HostBinding, ViewChild, ElementRef, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import { IgxSummaryCellComponent } from './summary-cell.component';
import { IgxGridForOfDirective } from '../../directives/for-of/for_of.directive';
import { GridBaseAPIService } from '../api.service';
import { IgxForOfSyncService } from '../../directives/for-of/for_of.sync.service';
export class IgxSummaryRowComponent {
    /**
     * @param {?} gridAPI
     * @param {?} element
     * @param {?} cdr
     */
    constructor(gridAPI, element, cdr) {
        this.gridAPI = gridAPI;
        this.element = element;
        this.cdr = cdr;
        this.indentation = 0;
        this.firstCellIndentation = -1;
    }
    /**
     * @return {?}
     */
    get dataRowIndex() {
        return this.index;
    }
    /**
     * @return {?}
     */
    get minHeight() {
        return this.grid.summaryService.calcMaxSummaryHeight() - 1;
    }
    /**
     * @return {?}
     */
    ngDoCheck() {
        this.cdr.markForCheck();
    }
    /**
     * @return {?}
     */
    get grid() {
        return this.gridAPI.grid;
    }
    /**
     * @return {?}
     */
    get nativeElement() {
        return this.element.nativeElement;
    }
    /**
     * @param {?} columnName
     * @return {?}
     */
    getColumnSummaries(columnName) {
        if (!this.summaries.get(columnName)) {
            return [];
        }
        return this.summaries.get(columnName);
    }
    /**
     * @hidden
     * @return {?}
     */
    get pinnedColumns() {
        return this.grid.pinnedColumns;
    }
    /**
     * @hidden
     * @return {?}
     */
    get unpinnedColumns() {
        return this.grid.unpinnedColumns;
    }
}
IgxSummaryRowComponent.decorators = [
    { type: Component, args: [{
                changeDetection: ChangeDetectionStrategy.OnPush,
                preserveWhitespaces: false,
                selector: 'igx-grid-summary-row',
                template: "<ng-container *ngIf=\"summaries.size\">\n    <ng-container *ngIf=\"indentation\">\n        <div class=\"igx-grid__row-indentation igx-grid__row-indentation--level-{{indentation}}\"></div>\n    </ng-container>\n    <ng-container *ngIf=\"grid.summariesMargin\">\n        <div\n        class=\"igx-grid__summaries-patch\"\n        [style.min-width.px]=\"grid.summariesMargin\"\n        [style.flex-basis.px]=\"grid.summariesMargin\"\n        ></div>\n    </ng-container>\n    <ng-container *ngIf=\"pinnedColumns.length > 0\">\n        <igx-grid-summary-cell *ngFor=\"let col of pinnedColumns | igxNotGrouped\"\n            class=\"igx-grid-summary igx-grid-summary--fw igx-grid-summary--pinned\"\n            [class.igx-grid-summary--cosy]=\"grid.displayDensity === 'cosy'\"\n            [class.igx-grid-summary--compact]=\"grid.displayDensity === 'compact'\"\n            [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n            [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n            [column]=\"col\"\n            [firstCellIndentation]=\"firstCellIndentation\"\n            [rowIndex]=\"index\"\n            [summaryResults]=\"getColumnSummaries(col.field)\"\n            [hasSummary]=\"col.hasSummary\"\n            [density]=\"grid.displayDensity\"\n            [style.max-height.px]=\"minHeight\"\n            [style.min-height.px]=\"minHeight\">\n        </igx-grid-summary-cell>\n    </ng-container>\n    <ng-template igxGridFor let-col [igxGridForOf]=\"unpinnedColumns | igxNotGrouped\" [igxForScrollContainer]=\"grid.parentVirtDir\" let-colIndex=\"index\" [igxForScrollOrientation]=\"'horizontal'\" [igxForContainerSize]=\"grid.unpinnedWidth\" [igxForTrackBy]=\"grid.trackColumnChanges\" [igxForSizePropName]='\"calcWidth\"' #igxDirRef>\n        <igx-grid-summary-cell\n            class=\"igx-grid-summary igx-grid-summary--fw\"\n            [class.igx-grid-summary--cosy]=\"grid.displayDensity === 'cosy'\"\n            [class.igx-grid-summary--compact]=\"grid.displayDensity === 'compact'\"\n            [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n            [column]=\"col\"\n            [rowIndex]=\"index\"\n            [firstCellIndentation]=\"firstCellIndentation\"\n            [summaryResults]=\"getColumnSummaries(col.field)\"\n            [hasSummary]=\"col.hasSummary\"\n            [density]=\"grid.displayDensity\"\n            [style.max-height.px]=\"minHeight\"\n            [style.min-height.px]=\"minHeight\">\n        </igx-grid-summary-cell>\n    </ng-template>\n</ng-container>\n",
                providers: [IgxForOfSyncService]
            }] }
];
/** @nocollapse */
IgxSummaryRowComponent.ctorParameters = () => [
    { type: GridBaseAPIService },
    { type: ElementRef },
    { type: ChangeDetectorRef }
];
IgxSummaryRowComponent.propDecorators = {
    summaries: [{ type: Input }],
    gridID: [{ type: Input }],
    index: [{ type: Input }],
    indentation: [{ type: Input }],
    firstCellIndentation: [{ type: Input }],
    dataRowIndex: [{ type: HostBinding, args: ['attr.data-rowIndex',] }],
    summaryCells: [{ type: ViewChildren, args: [IgxSummaryCellComponent, { read: IgxSummaryCellComponent },] }],
    virtDirRow: [{ type: ViewChild, args: ['igxDirRef', { read: IgxGridForOfDirective },] }]
};
if (false) {
    /** @type {?} */
    IgxSummaryRowComponent.prototype.summaries;
    /** @type {?} */
    IgxSummaryRowComponent.prototype.gridID;
    /** @type {?} */
    IgxSummaryRowComponent.prototype.index;
    /** @type {?} */
    IgxSummaryRowComponent.prototype.indentation;
    /** @type {?} */
    IgxSummaryRowComponent.prototype.firstCellIndentation;
    /** @type {?} */
    IgxSummaryRowComponent.prototype.summaryCells;
    /**
     * @hidden
     * @type {?}
     */
    IgxSummaryRowComponent.prototype.virtDirRow;
    /** @type {?} */
    IgxSummaryRowComponent.prototype.gridAPI;
    /** @type {?} */
    IgxSummaryRowComponent.prototype.element;
    /** @type {?} */
    IgxSummaryRowComponent.prototype.cdr;
}
//# sourceMappingURL=data:application/json;base64, 