/**
 * @fileoverview added by tsickle
 * Generated from: components/timeline/parts/timeline-item/timeline-item.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/*
    MIT License

    Copyright (c) 2019 Temainfo Software

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
*/
import { Component, EventEmitter, Input, Output, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
export class TlTimelineItem {
    constructor() {
        this.align = 'left';
        this.color = 'primary';
        this.data = [];
        this.initialize = new EventEmitter();
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        this.initialize.emit();
        this.changeSide();
    }
    /**
     * @return {?}
     */
    changeSide() {
        if (this.side) {
            this.sideString = 'left';
        }
        else {
            this.sideString = 'right';
        }
    }
    /**
     * @param {?} item
     * @param {?} index
     * @return {?}
     */
    setTemplateView(item, index) {
        /** @type {?} */
        const node = this.template.createEmbeddedView({
            item: item,
            index: index
        });
        this.insertOnView(node);
    }
    /**
     * @param {?} node
     * @return {?}
     */
    insertOnView(node) {
        this.view.insert(node);
    }
}
TlTimelineItem.decorators = [
    { type: Component, args: [{
                selector: 'tl-timeline-item',
                template: "<li [class]=\"'tl-timeline-item ' + color\" #customTemplateRef>\n  <div [class]=\"'tl-timeline-item-tail tail-' + align\"></div>\n  <div [class]=\"'tl-timeline-item-head head-' + align\">\n    <div class=\"head-date\" *ngIf=\"date\">\n      <span class=\"date-day\">{{ date | date : 'dd' }}</span>\n      <span class=\"date-month\">{{ date | date : 'MMM' | uppercase }}</span>\n      <span class=\"date-year\">{{ date | date : 'yyyy' }}</span>\n      <span class=\"date-separator\"></span>\n      <span class=\"date-hour\">{{ date | date : 'H:mm' }}</span>\n    </div>\n    <div class=\"head-dot\"></div>\n  </div>\n  <div class=\"tl-timeline-item-content\"\n       [ngClass]=\"align === 'center' ? (date) ? 'float-' + sideString + ' arrow-' + sideString : 'float-df-' + sideString + ' arrow-' + sideString : (date) ? 'content-' + align : 'content-df-' + align\">\n    <div #view></div>\n  </div>\n  <div class=\"clearfix\"></div>\n</li>\n",
                styles: ["@charset \"UTF-8\";.tl-timeline-item{list-style:none;margin:0 10px 0 20px;min-height:100px;padding:0 0 20px;position:relative}.tl-timeline-item .tl-timeline-item-head{position:absolute;width:50px}.tl-timeline-item .head-left{left:-20px}.tl-timeline-item .head-center{left:50%;margin-left:-24px}.tl-timeline-item .head-right{right:-20px}.tl-timeline-item .tl-timeline-item-head span{display:block;line-height:1.1;text-align:center}.tl-timeline-item .tl-timeline-item-head .head-date{border-radius:6px;padding:4px 0}.tl-timeline-item .tl-timeline-item-head .head-date .date-day{font-size:2em}.tl-timeline-item .tl-timeline-item-head .head-date .date-month{font-size:1em;letter-spacing:1px;margin-top:-3px}.tl-timeline-item .tl-timeline-item-head .head-date .date-year{font-size:12px;margin-top:6px}.tl-timeline-item .tl-timeline-item-head .head-date .date-separator{margin:4px 0}.tl-timeline-item .tl-timeline-item-head .head-date .date-hour{font-size:12px;font-weight:500}.tl-timeline-item .tl-timeline-item-head .head-dot{border-radius:50%;height:10px;margin-left:20px;margin-top:6px;width:10px}.tl-timeline-item .tl-timeline-item-tail{height:100%;position:absolute;top:.75em}.tl-timeline-item .tail-left{left:4px}.tl-timeline-item .tail-center{left:50%}.tl-timeline-item .tail-right{right:4px}.tl-timeline-item .tl-timeline-item-content{position:relative}.tl-timeline-item .tl-timeline-item-content:before{font-family:Ionicons;font-size:23px;position:absolute;top:0}.tl-timeline-item .tl-timeline-item-content .content-head{background:#6c9;border-top-left-radius:6px;border-top-right-radius:6px;color:#fff;display:table;padding:10px;width:100%}.tl-timeline-item .tl-timeline-item-content .content-head .content-title{display:table-cell;font-size:16px;font-weight:700}.tl-timeline-item .tl-timeline-item-content .content-head .content-time{display:table-cell;font-size:12px;text-align:right}.tl-timeline-item .tl-timeline-item-content .content-body{border:1px solid #ddd;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:none}.tl-timeline-item .tl-timeline-item-content .content-body .content-subtitle{background:#f2f2f2;border-bottom:1px solid #ddd;border-top:1px solid #ddd;font-size:14px;padding:5px 10px}.tl-timeline-item .tl-timeline-item-content .content-body .content-text{font-size:12px;padding:5px 10px}.tl-timeline-item .content-left{margin:0 0 0 40px}.tl-timeline-item .content-right{margin:0 40px 0 0}.tl-timeline-item .content-df-left{margin:0 0 0 25px}.tl-timeline-item .content-df-right{margin:0 25px 0 0}.tl-timeline-item .float-left{float:left;width:calc(50% - 40px)}.tl-timeline-item .float-right{float:right;width:calc(50% - 40px)}.tl-timeline-item .float-df-left{float:left;width:calc(50% - 20px)}.tl-timeline-item .float-df-right{float:right;width:calc(50% - 20px)}.tl-timeline-item .arrow-right:before,.tl-timeline-item .content-df-left:before,.tl-timeline-item .content-left:before{content:\"\uF282\";left:-5px}.tl-timeline-item .arrow-left:before,.tl-timeline-item .content-df-right:before,.tl-timeline-item .content-right:before{content:\"\uF284\";right:-5px}"]
            }] }
];
/** @nocollapse */
TlTimelineItem.ctorParameters = () => [];
TlTimelineItem.propDecorators = {
    align: [{ type: Input }],
    side: [{ type: Input }],
    date: [{ type: Input }],
    color: [{ type: Input }],
    data: [{ type: Input }],
    template: [{ type: Input }],
    initialize: [{ type: Output }],
    view: [{ type: ViewChild, args: ['view', { read: ViewContainerRef, static: true },] }]
};
if (false) {
    /** @type {?} */
    TlTimelineItem.prototype.align;
    /** @type {?} */
    TlTimelineItem.prototype.side;
    /** @type {?} */
    TlTimelineItem.prototype.date;
    /** @type {?} */
    TlTimelineItem.prototype.color;
    /** @type {?} */
    TlTimelineItem.prototype.data;
    /** @type {?} */
    TlTimelineItem.prototype.template;
    /** @type {?} */
    TlTimelineItem.prototype.initialize;
    /** @type {?} */
    TlTimelineItem.prototype.view;
    /** @type {?} */
    TlTimelineItem.prototype.sideString;
}
//# sourceMappingURL=data:application/json;base64, 