import { Component, HostBinding, Inject } from '@angular/core';
import { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/snack-bar";
import * as i2 from "../../icon/icon.component";
import * as i3 from "@angular/common";
export class AlertMessageComponent {
    constructor(data, snackBarRef) {
        this.snackBarRef = snackBarRef;
        this.message = data.message;
        this.status = data.status;
    }
    ngOnInit() {
    }
    close() {
        return this.snackBarRef.dismiss();
    }
}
AlertMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: AlertMessageComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
AlertMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: AlertMessageComponent, selector: "ng-component", host: { properties: { "attr.status": "this.status" } }, ngImport: i0, template: "<div class=\"content\">\n  <div class=\"content__icon\">\n    <ui-icon name=\"check-circle\" *ngIf=\"status === 'success'\"></ui-icon>\n    <ui-icon name=\"attention-circle\" *ngIf=\"status === 'warning'\"></ui-icon>\n    <ui-icon name=\"failed-circle\" *ngIf=\"status === 'error'\"></ui-icon>\n  </div>\n  <div class=\"content__message\">{{message}}</div>\n</div>\n<div class=\"action\">\n  <button (click)=\"close()\"><ui-icon name=\"x\"></ui-icon></button>\n</div>\n", styles: [":host{display:flex;border-radius:var(--radius-regular);box-sizing:border-box;transform-origin:center;font-size:var(--font-size-m);color:var(--color-primary-contrast);box-shadow:0 14px 32px rgba(88,187,147,.2);padding:16px 18px}:host .content{flex:1;display:flex}:host .content__icon{padding:1px 12px 1px 0;line-height:0}:host .content__message{flex:1}:host .action{padding:2px 0 0 10px;line-height:0}:host[status=success]{background:var(--color-primary)}:host[status=warning]{background:var(--color-warning)}:host[status=error]{background:var(--color-critical)}"], components: [{ type: i2.IconComponent, selector: "ui-icon", inputs: ["name", "color", "size", "stroke", "styles"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: AlertMessageComponent, decorators: [{
            type: Component,
            args: [{
                    templateUrl: './alert-message.component.html',
                    styleUrls: ['./alert-message.component.scss']
                }]
        }], ctorParameters: function () { return [{ type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_SNACK_BAR_DATA]
                }] }, { type: i1.MatSnackBarRef }]; }, propDecorators: { status: [{
                type: HostBinding,
                args: ['attr.status']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtbWVzc2FnZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi91aS1raXQvc3JjL2xpYi9hbGVydC9hbGVydC1tZXNzYWdlL2FsZXJ0LW1lc3NhZ2UuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vdWkta2l0L3NyYy9saWIvYWxlcnQvYWxlcnQtbWVzc2FnZS9hbGVydC1tZXNzYWdlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsV0FBVyxFQUFFLE1BQU0sRUFBUyxNQUFNLGVBQWUsQ0FBQztBQUNyRSxPQUFPLEVBQUMsa0JBQWtCLEVBQWlCLE1BQU0sNkJBQTZCLENBQUM7Ozs7O0FBYS9FLE1BQU0sT0FBTyxxQkFBcUI7SUFPaEMsWUFBd0MsSUFBc0IsRUFDMUMsV0FBZ0M7UUFBaEMsZ0JBQVcsR0FBWCxXQUFXLENBQXFCO1FBQ2xELElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQztRQUM1QixJQUFJLENBQUMsTUFBTSxHQUFHLElBQU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