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 __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ElTreeGridRowDefDirective_1, ElTreeGridHeaderRowDefDirective_1, ElTreeGridFooterRowDefDirective_1, ElTreeGridCellDefDirective_1, ElTreeGridHeaderCellDefDirective_1, ElTreeGridFooterCellDefDirective_1;
import { Directive, Input, IterableDiffers, TemplateRef } from '@angular/core';
import { ElCdkCellDef, ElCdkFooterCellDef, ElCdkFooterRowDef, ElCdkHeaderCellDef, ElCdkHeaderRowDef, ElCdkRowDef, } from '../cdk/table/type-mappings';
import { ElCellDefDirective, ElFooterCellDefDirective, ElHeaderCellDefDirective } from '../cdk/table/cell';
import { ElFooterRowDefDirective, ElHeaderRowDefDirective, ElRowDefDirective } from '../cdk/table/row';
import { ElColumnsService } from './tree-grid-columns.service';
/**
 * Data row definition for the tree-grid.
 * Captures the header row's template and columns to display.
 */
let ElTreeGridRowDefDirective = ElTreeGridRowDefDirective_1 = class ElTreeGridRowDefDirective extends ElRowDefDirective {
    constructor(template, differs, columnsService) {
        super(template, differs);
        this.columnsService = columnsService;
    }
    /**
     * Columns to be displayed on this row
     */
    set columns(value) {
        this.columnsService.setColumns(value);
    }
    get columns() {
        return this.columnsService.getVisibleColumns();
    }
    /** @docs-private */
    hideColumn(column) {
        this.columnsService.hideColumn(column);
    }
    /** @docs-private */
    showColumn(column) {
        this.columnsService.showColumn(column);
    }
};
__decorate([
    Input('elTreeGridRowDefColumns'),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], ElTreeGridRowDefDirective.prototype, "columns", null);
ElTreeGridRowDefDirective = ElTreeGridRowDefDirective_1 = __decorate([
    Directive({
        selector: '[elTreeGridRowDef]',
        providers: [{ provide: ElCdkRowDef, useExisting: ElTreeGridRowDefDirective_1 }],
    }),
    __metadata("design:paramtypes", [TemplateRef,
        IterableDiffers,
        ElColumnsService])
], ElTreeGridRowDefDirective);
export { ElTreeGridRowDefDirective };
let ElTreeGridHeaderRowDefDirective = ElTreeGridHeaderRowDefDirective_1 = class ElTreeGridHeaderRowDefDirective extends ElHeaderRowDefDirective {
    constructor(template, differs, columnsService) {
        super(template, differs);
        this.columnsService = columnsService;
    }
    /**
     * Columns to be displayed on this row
     */
    set columns(value) {
        this.columnsService.setColumns(value);
    }
    get columns() {
        return this.columnsService.getVisibleColumns();
    }
    /** @docs-private */
    hideColumn(column) {
        this.columnsService.hideColumn(column);
    }
    /** @docs-private */
    showColumn(column) {
        this.columnsService.showColumn(column);
    }
};
__decorate([
    Input('elTreeGridHeaderRowDef'),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], ElTreeGridHeaderRowDefDirective.prototype, "columns", null);
ElTreeGridHeaderRowDefDirective = ElTreeGridHeaderRowDefDirective_1 = __decorate([
    Directive({
        selector: '[elTreeGridHeaderRowDef]',
        providers: [{ provide: ElCdkHeaderRowDef, useExisting: ElTreeGridHeaderRowDefDirective_1 }],
    }),
    __metadata("design:paramtypes", [TemplateRef,
        IterableDiffers,
        ElColumnsService])
], ElTreeGridHeaderRowDefDirective);
export { ElTreeGridHeaderRowDefDirective };
let ElTreeGridFooterRowDefDirective = ElTreeGridFooterRowDefDirective_1 = class ElTreeGridFooterRowDefDirective extends ElFooterRowDefDirective {
    constructor(template, differs, columnsService) {
        super(template, differs);
        this.columnsService = columnsService;
    }
    /**
     * Columns to be displayed on this row
     */
    set columns(value) {
        this.columnsService.setColumns(value);
    }
    get columns() {
        return this.columnsService.getVisibleColumns();
    }
    /** @docs-private */
    hideColumn(column) {
        this.columnsService.hideColumn(column);
    }
    /** @docs-private */
    showColumn(column) {
        this.columnsService.showColumn(column);
    }
};
__decorate([
    Input('elTreeGridFooterRowDef'),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], ElTreeGridFooterRowDefDirective.prototype, "columns", null);
ElTreeGridFooterRowDefDirective = ElTreeGridFooterRowDefDirective_1 = __decorate([
    Directive({
        selector: '[elTreeGridFooterRowDef]',
        providers: [{ provide: ElCdkFooterRowDef, useExisting: ElTreeGridFooterRowDefDirective_1 }],
    }),
    __metadata("design:paramtypes", [TemplateRef,
        IterableDiffers,
        ElColumnsService])
], ElTreeGridFooterRowDefDirective);
export { ElTreeGridFooterRowDefDirective };
/**
 * Cell definition for a el-table.
 * Captures the template of a column's data row cell as well as cell-specific properties.
 */
let ElTreeGridCellDefDirective = ElTreeGridCellDefDirective_1 = class ElTreeGridCellDefDirective extends ElCellDefDirective {
};
ElTreeGridCellDefDirective = ElTreeGridCellDefDirective_1 = __decorate([
    Directive({
        selector: '[elTreeGridCellDef]',
        providers: [{ provide: ElCdkCellDef, useExisting: ElTreeGridCellDefDirective_1 }],
    })
], ElTreeGridCellDefDirective);
export { ElTreeGridCellDefDirective };
/**
 * Header cell definition for the el-table.
 * Captures the template of a column's header cell and as well as cell-specific properties.
 */
let ElTreeGridHeaderCellDefDirective = ElTreeGridHeaderCellDefDirective_1 = class ElTreeGridHeaderCellDefDirective extends ElHeaderCellDefDirective {
};
ElTreeGridHeaderCellDefDirective = ElTreeGridHeaderCellDefDirective_1 = __decorate([
    Directive({
        selector: '[elTreeGridHeaderCellDef]',
        providers: [{ provide: ElCdkHeaderCellDef, useExisting: ElTreeGridHeaderCellDefDirective_1 }],
    })
], ElTreeGridHeaderCellDefDirective);
export { ElTreeGridHeaderCellDefDirective };
/**
 * Footer cell definition for the el-table.
 * Captures the template of a column's footer cell and as well as cell-specific properties.
 */
let ElTreeGridFooterCellDefDirective = ElTreeGridFooterCellDefDirective_1 = class ElTreeGridFooterCellDefDirective extends ElFooterCellDefDirective {
};
ElTreeGridFooterCellDefDirective = ElTreeGridFooterCellDefDirective_1 = __decorate([
    Directive({
        selector: '[elTreeGridFooterCellDef]',
        providers: [{ provide: ElCdkFooterCellDef, useExisting: ElTreeGridFooterCellDefDirective_1 }],
    })
], ElTreeGridFooterCellDefDirective);
export { ElTreeGridFooterCellDefDirective };
//# sourceMappingURL=tree-grid-def.component.js.map