/**
 * @fileoverview added by tsickle
 * Generated from: lib/dialog/new-action-notification/new-action-notification.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import * as tslib_1 from "tslib";
import { Component, Inject } from "@angular/core";
import { MAT_SNACK_BAR_DATA } from "@angular/material/snack-bar";
/**
 * @record
 */
export function NotificationConfig() { }
if (false) {
    /** @type {?} */
    NotificationConfig.prototype.message;
    /** @type {?} */
    NotificationConfig.prototype.snackBar;
    /** @type {?} */
    NotificationConfig.prototype.loadingCallback;
    /** @type {?|undefined} */
    NotificationConfig.prototype.status;
    /** @type {?|undefined} */
    NotificationConfig.prototype.type;
    /** @type {?|undefined} */
    NotificationConfig.prototype.title;
}
;
var NewActionNotificationComponent = /** @class */ (function () {
    function NewActionNotificationComponent(data) {
        this.data = data;
        this.collapsed = false;
    }
    /**
     * @return {?}
     */
    NewActionNotificationComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.config.type === "Loading") {
            this.config.loadingCallback((/**
             * @param {?} progress
             * @return {?}
             */
            function (progress) {
                if (progress.done) {
                    return _this.config.snackBar.dismiss();
                }
            }));
        }
    };
    /**
     * @return {?}
     */
    NewActionNotificationComponent.prototype.closeNotification = /**
     * @return {?}
     */
    function () {
        if (this.config.type === "Loading") {
            this.collapsed = true;
        }
        else {
            this.config.snackBar.dismiss();
        }
    };
    /**
     * @return {?}
     */
    NewActionNotificationComponent.prototype.expandNotification = /**
     * @return {?}
     */
    function () {
        if (this.config.type === "Loading" && this.collapsed) {
            this.collapsed = false;
        }
    };
    Object.defineProperty(NewActionNotificationComponent.prototype, "config", {
        get: /**
         * @return {?}
         */
        function () {
            return tslib_1.__assign({ status: "Success", type: "Text" }, this.data);
        },
        enumerable: true,
        configurable: true
    });
    NewActionNotificationComponent.decorators = [
        { type: Component, args: [{
                    selector: "kt-new-action-notification",
                    template: "<div class=\"new-action-notification-container\" [attr.data-collapse]=\"collapsed\">\r\n\t<span\r\n\t\tclass=\"notification-icon\"\r\n\t\t[attr.data-type]=\"config.type === 'Loading' ? 'loading' : 'default'\"\r\n\t\t[attr.data-status]=\"config.status?.toLowerCase()\"\r\n\t\t(click)=\"expandNotification()\"\r\n\t></span>\r\n\t<span\r\n\t\tclass=\"notification-icon notification-loading\"\r\n\t\t*ngIf=\"config.type === 'Progress'\"\r\n\t></span>\r\n\t<div class=\"notification-content\">\r\n\t\t<span *ngIf=\"config.type === 'Detail'\" class=\"notification-title\">\r\n\t\t\t{{ config.title }}\r\n\t\t</span>\r\n\t\t<span class=\"notification-text\">{{ config.message }}</span>\r\n\t\t<a *ngIf=\"config.type === 'Detail'\" class=\"notification-link\">View</a>\r\n\t</div>\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"notification-close\"\r\n\t\t[attr.data-type]=\"config.type === 'Loading' ? 'loading' : 'default'\"\r\n\t\t(click)=\"closeNotification()\"\r\n\t></button>\r\n</div>\r\n",
                    styles: ["::ng-deep .new-action-notification{margin:0;padding:64px 12px;background-color:transparent!important;background-image:none!important;box-shadow:none}::ng-deep .mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:none;background-color:transparent}.new-action-notification-container{min-width:320px;max-width:400px;padding:12px;border-radius:10px;background-color:#fff;box-shadow:0 0 8px 0 #00000033;display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-end}.new-action-notification-container .notification-icon{flex:none;width:24px;height:24px;margin-right:8px}.new-action-notification-container .notification-icon[data-type=default][data-status=success]::before{content:url(../../assets/img/notification-status-success.svg)}.new-action-notification-container .notification-icon[data-type=default][data-status=warning]::before{content:url(../../assets/img/notification-status-warning.svg)}.new-action-notification-container .notification-icon[data-type=default][data-status=error]::before{content:url(../../assets/img/notification-status-error.svg)}.new-action-notification-container .notification-icon[data-type=loading]{-webkit-animation:2s linear infinite rotate;animation:2s linear infinite rotate}@-webkit-keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0)}}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0)}}.new-action-notification-container .notification-icon[data-type=loading]::before{content:url(../../assets/img/notification-status-loading.svg)}.new-action-notification-container .notification-close{flex:none;height:24px;margin-left:24px;padding:0;border:none;background-color:transparent}.new-action-notification-container .notification-close[data-type=default]::before{content:url(../../assets/img/notification-close.svg)}.new-action-notification-container .notification-close[data-type=loading]::before{content:url(../../assets/img/notification-collapse.svg)}.new-action-notification-container .notification-content{flex:auto;min-height:24px;padding-top:4px;display:flex;flex-flow:column nowrap}.new-action-notification-container .notification-content .notification-title{margin-bottom:8px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:19px}.new-action-notification-container .notification-content .notification-text{color:#1f3f5c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.new-action-notification-container .notification-content .notification-link{margin-top:6px;cursor:pointer;color:#1364b3;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px}.new-action-notification-container[data-collapse=true]{padding:0;background-color:transparent;box-shadow:none}.new-action-notification-container[data-collapse=true] .notification-icon{cursor:pointer}.new-action-notification-container[data-collapse=true] .notification-close,.new-action-notification-container[data-collapse=true] .notification-content{display:none}"]
                }] }
    ];
    /** @nocollapse */
    NewActionNotificationComponent.ctorParameters = function () { return [
        { type: undefined, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DATA,] }] }
    ]; };
    return NewActionNotificationComponent;
}());
export { NewActionNotificationComponent };
if (false) {
    /** @type {?} */
    NewActionNotificationComponent.prototype.collapsed;
    /** @type {?} */
    NewActionNotificationComponent.prototype.data;
}
//# sourceMappingURL=data:application/json;base64, 