import { Component, ContentChild, ViewEncapsulation, ContentChildren } from '@angular/core';
import { NzTimelineItemComponent } from './nz-timeline-item.component';
var NzTimelineComponent = (function () {
    function NzTimelineComponent() {
        this._isPending = false;
        this.items = [];
    }
    NzTimelineComponent.prototype.ngOnInit = function () {
        if (this._pendingContent) {
            this._isPending = true;
        }
    };
    NzTimelineComponent.prototype.ngAfterContentInit = function () {
        var _this = this;
        setTimeout(function (_) {
            if (_this._listOfTimeline && _this._listOfTimeline.length) {
                var listArray = _this._listOfTimeline.toArray();
                listArray[listArray.length - 1]._lastItem = true;
            }
        });
    };
    return NzTimelineComponent;
}());
export { NzTimelineComponent };
NzTimelineComponent.decorators = [
    { type: Component, args: [{
                selector: 'nz-timeline',
                encapsulation: ViewEncapsulation.None,
                template: "\n    <ul class=\"ant-timeline\" [class.ant-timeline-pending]=\"_isPending\">\n      <ng-content></ng-content>\n      <li *ngIf=\"_isPending\" class=\"ant-timeline-item ant-timeline-item-pending\">\n        <div class=\"ant-timeline-item-tail\"></div>\n        <div class=\"ant-timeline-item-head ant-timeline-item-head-blue\"></div>\n        <div class=\"ant-timeline-item-content\">\n          <ng-template [ngTemplateOutlet]=\"_pendingContent\">\n          </ng-template>\n        </div>\n      </li>\n    </ul>",
                styles: ["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable declaration-bang-space-before */\n/* stylelint-disable declaration-bang-space-before */\n.ant-timeline {\n  list-style: none;\n  margin: 0;\n  padding: 0;\n}\n.ant-timeline-item {\n  position: relative;\n  padding: 0 0 12px;\n  list-style: none;\n  margin: 0;\n}\n.ant-timeline-item-tail {\n  position: absolute;\n  left: 5px;\n  top: 0;\n  height: 100%;\n  border-left: 2px solid #e9e9e9;\n}\n.ant-timeline-item-pending .ant-timeline-item-tail {\n  display: none;\n}\n.ant-timeline-item-head {\n  position: absolute;\n  width: 12px;\n  height: 12px;\n  background-color: #fff;\n  border-radius: 100px;\n  border: 2px solid transparent;\n}\n.ant-timeline-item-head-blue {\n  border-color: #108ee9;\n  color: #108ee9;\n}\n.ant-timeline-item-head-red {\n  border-color: #f04134;\n  color: #f04134;\n}\n.ant-timeline-item-head-green {\n  border-color: #00a854;\n  color: #00a854;\n}\n.ant-timeline-item-head-custom {\n  position: absolute;\n  text-align: center;\n  width: 40px;\n  left: -14px;\n  line-height: 1;\n  margin-top: 6px;\n  border: 0;\n  height: auto;\n  border-radius: 0;\n  padding: 3px 0;\n  font-size: 12px;\n  transform: translateY(-50%);\n}\n.ant-timeline-item-content {\n  padding: 0 0 10px 24px;\n  font-size: 12px;\n  position: relative;\n  top: -3px;\n}\n.ant-timeline-item-last .ant-timeline-item-tail {\n  border-left: 2px dotted #e9e9e9;\n  display: none;\n}\n.ant-timeline-item-last .ant-timeline-item-content {\n  min-height: 48px;\n}\n.ant-timeline.ant-timeline-pending .ant-timeline-item-last .ant-timeline-item-tail {\n  display: block;\n}\n"]
            },] },
];
/** @nocollapse */
NzTimelineComponent.ctorParameters = function () { return []; };
NzTimelineComponent.propDecorators = {
    '_listOfTimeline': [{ type: ContentChildren, args: [NzTimelineItemComponent,] },],
    '_pendingContent': [{ type: ContentChild, args: ['pending',] },],
};
