/**
 * @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 { 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;
}
;
export class NewActionNotificationComponent {
    /**
     * @param {?} data
     */
    constructor(data) {
        this.data = data;
        this.collapsed = false;
    }
    /**
     * @return {?}
     */
    ngAfterViewInit() {
        if (this.config.type === "Loading") {
            this.config.loadingCallback((/**
             * @param {?} progress
             * @return {?}
             */
            (progress) => {
                if (progress.done) {
                    return this.config.snackBar.dismiss();
                }
            }));
        }
    }
    /**
     * @return {?}
     */
    closeNotification() {
        if (this.config.type === "Loading") {
            this.collapsed = true;
        }
        else {
            this.config.snackBar.dismiss();
        }
    }
    /**
     * @return {?}
     */
    expandNotification() {
        if (this.config.type === "Loading" && this.collapsed) {
            this.collapsed = false;
        }
    }
    /**
     * @return {?}
     */
    get config() {
        return Object.assign({ status: "Success", type: "Text" }, this.data);
    }
}
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 = () => [
    { type: undefined, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DATA,] }] }
];
if (false) {
    /** @type {?} */
    NewActionNotificationComponent.prototype.collapsed;
    /** @type {?} */
    NewActionNotificationComponent.prototype.data;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV3LWFjdGlvbi1ub3RpZmljYXRpb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vcmFpc2UtY29tbW9uLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9kaWFsb2cvbmV3LWFjdGlvbi1ub3RpZmljYXRpb24vbmV3LWFjdGlvbi1ub3RpZmljYXRpb24uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFpQixTQUFTLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2pFLE9BQU8sRUFBRSxrQkFBa0IsRUFBZSxNQUFNLDZCQUE2QixDQUFDOzs7O0F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