var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        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 __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
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.
 */
var ElTreeGridRowDefDirective = /** @class */ (function (_super) {
    __extends(ElTreeGridRowDefDirective, _super);
    function ElTreeGridRowDefDirective(template, differs, columnsService) {
        var _this = _super.call(this, template, differs) || this;
        _this.columnsService = columnsService;
        return _this;
    }
    ElTreeGridRowDefDirective_1 = ElTreeGridRowDefDirective;
    Object.defineProperty(ElTreeGridRowDefDirective.prototype, "columns", {
        get: function () {
            return this.columnsService.getVisibleColumns();
        },
        /**
         * Columns to be displayed on this row
         */
        set: function (value) {
            this.columnsService.setColumns(value);
        },
        enumerable: true,
        configurable: true
    });
    /** @docs-private */
    ElTreeGridRowDefDirective.prototype.hideColumn = function (column) {
        this.columnsService.hideColumn(column);
    };
    /** @docs-private */
    ElTreeGridRowDefDirective.prototype.showColumn = function (column) {
        this.columnsService.showColumn(column);
    };
    var ElTreeGridRowDefDirective_1;
    __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);
    return ElTreeGridRowDefDirective;
}(ElRowDefDirective));
export { ElTreeGridRowDefDirective };
var ElTreeGridHeaderRowDefDirective = /** @class */ (function (_super) {
    __extends(ElTreeGridHeaderRowDefDirective, _super);
    function ElTreeGridHeaderRowDefDirective(template, differs, columnsService) {
        var _this = _super.call(this, template, differs) || this;
        _this.columnsService = columnsService;
        return _this;
    }
    ElTreeGridHeaderRowDefDirective_1 = ElTreeGridHeaderRowDefDirective;
    Object.defineProperty(ElTreeGridHeaderRowDefDirective.prototype, "columns", {
        get: function () {
            return this.columnsService.getVisibleColumns();
        },
        /**
         * Columns to be displayed on this row
         */
        set: function (value) {
            this.columnsService.setColumns(value);
        },
        enumerable: true,
        configurable: true
    });
    /** @docs-private */
    ElTreeGridHeaderRowDefDirective.prototype.hideColumn = function (column) {
        this.columnsService.hideColumn(column);
    };
    /** @docs-private */
    ElTreeGridHeaderRowDefDirective.prototype.showColumn = function (column) {
        this.columnsService.showColumn(column);
    };
    var ElTreeGridHeaderRowDefDirective_1;
    __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);
    return ElTreeGridHeaderRowDefDirective;
}(ElHeaderRowDefDirective));
export { ElTreeGridHeaderRowDefDirective };
var ElTreeGridFooterRowDefDirective = /** @class */ (function (_super) {
    __extends(ElTreeGridFooterRowDefDirective, _super);
    function ElTreeGridFooterRowDefDirective(template, differs, columnsService) {
        var _this = _super.call(this, template, differs) || this;
        _this.columnsService = columnsService;
        return _this;
    }
    ElTreeGridFooterRowDefDirective_1 = ElTreeGridFooterRowDefDirective;
    Object.defineProperty(ElTreeGridFooterRowDefDirective.prototype, "columns", {
        get: function () {
            return this.columnsService.getVisibleColumns();
        },
        /**
         * Columns to be displayed on this row
         */
        set: function (value) {
            this.columnsService.setColumns(value);
        },
        enumerable: true,
        configurable: true
    });
    /** @docs-private */
    ElTreeGridFooterRowDefDirective.prototype.hideColumn = function (column) {
        this.columnsService.hideColumn(column);
    };
    /** @docs-private */
    ElTreeGridFooterRowDefDirective.prototype.showColumn = function (column) {
        this.columnsService.showColumn(column);
    };
    var ElTreeGridFooterRowDefDirective_1;
    __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);
    return ElTreeGridFooterRowDefDirective;
}(ElFooterRowDefDirective));
export { ElTreeGridFooterRowDefDirective };
/**
 * Cell definition for a el-table.
 * Captures the template of a column's data row cell as well as cell-specific properties.
 */
var ElTreeGridCellDefDirective = /** @class */ (function (_super) {
    __extends(ElTreeGridCellDefDirective, _super);
    function ElTreeGridCellDefDirective() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ElTreeGridCellDefDirective_1 = ElTreeGridCellDefDirective;
    var ElTreeGridCellDefDirective_1;
    ElTreeGridCellDefDirective = ElTreeGridCellDefDirective_1 = __decorate([
        Directive({
            selector: '[elTreeGridCellDef]',
            providers: [{ provide: ElCdkCellDef, useExisting: ElTreeGridCellDefDirective_1 }],
        })
    ], ElTreeGridCellDefDirective);
    return ElTreeGridCellDefDirective;
}(ElCellDefDirective));
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.
 */
var ElTreeGridHeaderCellDefDirective = /** @class */ (function (_super) {
    __extends(ElTreeGridHeaderCellDefDirective, _super);
    function ElTreeGridHeaderCellDefDirective() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ElTreeGridHeaderCellDefDirective_1 = ElTreeGridHeaderCellDefDirective;
    var ElTreeGridHeaderCellDefDirective_1;
    ElTreeGridHeaderCellDefDirective = ElTreeGridHeaderCellDefDirective_1 = __decorate([
        Directive({
            selector: '[elTreeGridHeaderCellDef]',
            providers: [{ provide: ElCdkHeaderCellDef, useExisting: ElTreeGridHeaderCellDefDirective_1 }],
        })
    ], ElTreeGridHeaderCellDefDirective);
    return ElTreeGridHeaderCellDefDirective;
}(ElHeaderCellDefDirective));
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.
 */
var ElTreeGridFooterCellDefDirective = /** @class */ (function (_super) {
    __extends(ElTreeGridFooterCellDefDirective, _super);
    function ElTreeGridFooterCellDefDirective() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ElTreeGridFooterCellDefDirective_1 = ElTreeGridFooterCellDefDirective;
    var ElTreeGridFooterCellDefDirective_1;
    ElTreeGridFooterCellDefDirective = ElTreeGridFooterCellDefDirective_1 = __decorate([
        Directive({
            selector: '[elTreeGridFooterCellDef]',
            providers: [{ provide: ElCdkFooterCellDef, useExisting: ElTreeGridFooterCellDefDirective_1 }],
        })
    ], ElTreeGridFooterCellDefDirective);
    return ElTreeGridFooterCellDefDirective;
}(ElFooterCellDefDirective));
export { ElTreeGridFooterCellDefDirective };
//# sourceMappingURL=tree-grid-def.component.js.map