/*
 * @license
 * Copyright Endlessjs. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license infornbion.
 */
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, ElementRef, InjectionToken, Input } from '@angular/core';
import { CdkCell, CdkCellDef, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkHeaderCell, CdkHeaderCellDef, } from '@angular/cdk/table';
/**
 * Cell definition for the el-table.
 * Captures the template of a column's data row cell as well as cell-specific properties.
 */
var ElCellDefDirective = /** @class */ (function (_super) {
    __extends(ElCellDefDirective, _super);
    function ElCellDefDirective() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ElCellDefDirective_1 = ElCellDefDirective;
    var ElCellDefDirective_1;
    ElCellDefDirective = ElCellDefDirective_1 = __decorate([
        Directive({
            selector: '[elCellDef]',
            providers: [{ provide: CdkCellDef, useExisting: ElCellDefDirective_1 }],
        })
    ], ElCellDefDirective);
    return ElCellDefDirective;
}(CdkCellDef));
export { ElCellDefDirective };
/**
 * Header cell definition for the el-table.
 * Captures the template of a column's header cell and as well as cell-specific properties.
 */
var ElHeaderCellDefDirective = /** @class */ (function (_super) {
    __extends(ElHeaderCellDefDirective, _super);
    function ElHeaderCellDefDirective() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ElHeaderCellDefDirective_1 = ElHeaderCellDefDirective;
    var ElHeaderCellDefDirective_1;
    ElHeaderCellDefDirective = ElHeaderCellDefDirective_1 = __decorate([
        Directive({
            selector: '[elHeaderCellDef]',
            providers: [{ provide: CdkHeaderCellDef, useExisting: ElHeaderCellDefDirective_1 }],
        })
    ], ElHeaderCellDefDirective);
    return ElHeaderCellDefDirective;
}(CdkHeaderCellDef));
export { ElHeaderCellDefDirective };
/**
 * Footer cell definition for the el-table.
 * Captures the template of a column's footer cell and as well as cell-specific properties.
 */
var ElFooterCellDefDirective = /** @class */ (function (_super) {
    __extends(ElFooterCellDefDirective, _super);
    function ElFooterCellDefDirective() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ElFooterCellDefDirective_1 = ElFooterCellDefDirective;
    var ElFooterCellDefDirective_1;
    ElFooterCellDefDirective = ElFooterCellDefDirective_1 = __decorate([
        Directive({
            selector: '[elFooterCellDef]',
            providers: [{ provide: CdkFooterCellDef, useExisting: ElFooterCellDefDirective_1 }],
        })
    ], ElFooterCellDefDirective);
    return ElFooterCellDefDirective;
}(CdkFooterCellDef));
export { ElFooterCellDefDirective };
export var EL_SORT_HEADER_COLUMN_DEF = new InjectionToken('EL_SORT_HEADER_COLUMN_DEF');
/**
 * Column definition for the el-table.
 * Defines a set of cells available for a table column.
 */
var ElColumnDefDirective = /** @class */ (function (_super) {
    __extends(ElColumnDefDirective, _super);
    function ElColumnDefDirective() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ElColumnDefDirective_1 = ElColumnDefDirective;
    var ElColumnDefDirective_1;
    __decorate([
        Input('elColumnDef'),
        __metadata("design:type", String)
    ], ElColumnDefDirective.prototype, "name", void 0);
    __decorate([
        Input(),
        __metadata("design:type", Boolean)
    ], ElColumnDefDirective.prototype, "sticky", void 0);
    __decorate([
        Input(),
        __metadata("design:type", Boolean)
    ], ElColumnDefDirective.prototype, "stickyEnd", void 0);
    ElColumnDefDirective = ElColumnDefDirective_1 = __decorate([
        Directive({
            selector: '[elColumnDef]',
            providers: [
                { provide: CdkColumnDef, useExisting: ElColumnDefDirective_1 },
                { provide: EL_SORT_HEADER_COLUMN_DEF, useExisting: ElColumnDefDirective_1 },
            ],
        })
    ], ElColumnDefDirective);
    return ElColumnDefDirective;
}(CdkColumnDef));
export { ElColumnDefDirective };
/** Header cell template container that adds the right classes and role. */
var ElHeaderCellDirective = /** @class */ (function (_super) {
    __extends(ElHeaderCellDirective, _super);
    function ElHeaderCellDirective(columnDef, elementRef) {
        var _this = _super.call(this, columnDef, elementRef) || this;
        elementRef.nativeElement.classList.add("el-column-" + columnDef.cssClassFriendlyName);
        return _this;
    }
    ElHeaderCellDirective = __decorate([
        Directive({
            selector: 'el-header-cell, th[elHeaderCell]',
            host: {
                'class': 'el-header-cell',
                'role': 'columnheader',
            },
        }),
        __metadata("design:paramtypes", [ElColumnDefDirective,
            ElementRef])
    ], ElHeaderCellDirective);
    return ElHeaderCellDirective;
}(CdkHeaderCell));
export { ElHeaderCellDirective };
/** Footer cell template container that adds the right classes and role. */
var ElFooterCellDirective = /** @class */ (function (_super) {
    __extends(ElFooterCellDirective, _super);
    function ElFooterCellDirective(columnDef, elementRef) {
        var _this = _super.call(this, columnDef, elementRef) || this;
        elementRef.nativeElement.classList.add("el-column-" + columnDef.cssClassFriendlyName);
        return _this;
    }
    ElFooterCellDirective = __decorate([
        Directive({
            selector: 'el-footer-cell, td[elFooterCell]',
            host: {
                'class': 'el-footer-cell',
                'role': 'gridcell',
            },
        }),
        __metadata("design:paramtypes", [ElColumnDefDirective,
            ElementRef])
    ], ElFooterCellDirective);
    return ElFooterCellDirective;
}(CdkFooterCell));
export { ElFooterCellDirective };
/** Cell template container that adds the right classes and role. */
var ElCellDirective = /** @class */ (function (_super) {
    __extends(ElCellDirective, _super);
    function ElCellDirective(columnDef, elementRef) {
        var _this = _super.call(this, columnDef, elementRef) || this;
        elementRef.nativeElement.classList.add("el-column-" + columnDef.cssClassFriendlyName);
        return _this;
    }
    ElCellDirective = __decorate([
        Directive({
            selector: 'el-cell, td[elCell]',
            host: {
                'class': 'el-cell',
                'role': 'gridcell',
            },
        }),
        __metadata("design:paramtypes", [ElColumnDefDirective,
            ElementRef])
    ], ElCellDirective);
    return ElCellDirective;
}(CdkCell));
export { ElCellDirective };
//# sourceMappingURL=cell.js.map