/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, EventEmitter, Input, Output } from '@angular/core';
var ToastComponent = /** @class */ (function () {
    function ToastComponent() {
        this.duration = 3000;
        this.remove = new EventEmitter();
        this.interactive = false;
    }
    /**
     * @return {?}
     */
    ToastComponent.prototype.clearTimeout = /**
     * @return {?}
     */
    function () {
        this.interactive = true;
        clearTimeout(this.timeout);
    };
    /**
     * @return {?}
     */
    ToastComponent.prototype.close = /**
     * @return {?}
     */
    function () {
        this.remove.emit(this.notification);
    };
    /**
     * @return {?}
     */
    ToastComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.timeout = setTimeout(function () { return _this.close(); }, this.duration);
    };
    ToastComponent.decorators = [
        { type: Component, args: [{
                    selector: 'bidi-toast',
                    template: "<div\n  (mouseenter)=\"clearTimeout()\"\n  class=\"toast\"\n  [ngClass]=\"{\n    'has-text-info': notification.type === 'info',\n    'has-text-success': notification.type === 'success',\n    'has-text-warning': notification.type === 'warning',\n    'has-text-danger': notification.type === 'error',\n    'has-text-white': ['info', 'success', 'error'].includes(notification.type)\n  }\"\n  >\n  <div class=\"text-toast-container\">\n    <p class=\"is-ff-light is-size-6\">{{ notification.text }}</p>\n    <div *ngIf=\"interactive\">\n      <a (click)=\"close()\" class=\"delete\"></a>\n    </div>\n  </div>\n  \n</div>\n",
                    styles: [".toast{margin-bottom:1rem;padding:1rem .3rem 1rem 1rem;background:rgba(30,54,72,.95);border-left:13px solid;box-shadow:0 2px 2px rgba(0,0,0,.3);display:flex;flex-direction:column;justify-content:center;min-height:81px}.toast .text-toast-container{display:flex;justify-content:space-between}.toast .text-toast-container p{font-weight:300;text-shadow:0 -1px 0 rgba(0,0,0,.9);color:#fff}"]
                }] }
    ];
    ToastComponent.propDecorators = {
        notification: [{ type: Input }],
        duration: [{ type: Input }],
        remove: [{ type: Output }]
    };
    return ToastComponent;
}());
export { ToastComponent };
if (false) {
    /** @type {?} */
    ToastComponent.prototype.notification;
    /** @type {?} */
    ToastComponent.prototype.duration;
    /** @type {?} */
    ToastComponent.prototype.remove;
    /** @type {?} */
    ToastComponent.prototype.interactive;
    /**
     * @type {?}
     * @private
     */
    ToastComponent.prototype.timeout;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9hc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGJpZGkvY29tbW9uLWNvbXBvbmVudHMvIiwic291cmNlcyI6WyJsaWIvbW9kdWxlcy9ub3RpZmljYXRpb24vdG9hc3QvdG9hc3QuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRy9FO0lBQUE7UUFPVyxhQUFRLEdBQUcsSUFBSSxDQUFDO1FBQ2YsV0FBTSxHQUFHLElBQUksWUFBWSxFQUFnQixDQUFDO1FBQ3BELGdCQUFXLEdBQUcsS0FBSyxDQUFDO0lBZXRCLENBQUM7Ozs7SUFaQyxxQ0FBWTs7O0lBQVo7UUFDRSxJQUFJLENBQUMsV0FBVyxHQUFHLElBQUksQ0FBQztRQUN4QixZQUFZLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQzdCLENBQUM7Ozs7SUFFRCw4QkFBSzs7O0lBQUw7UUFDRSxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLENBQUM7SUFDdEMsQ0FBQzs7OztJQUVELGlDQUFROzs7SUFBUjtRQUFBLGlCQUVDO1FBREMsSUFBSSxDQUFDLE9BQU8sR0FBRyxVQUFVLENBQUMsY0FBTSxPQUFBLEtBQUksQ0FBQyxLQUFLLEVBQUUsRUF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