import { Component, Input } from '@angular/core';
import { ZuiB } from '@material-zui/core';
import { ZUIToastV2Service } from './service/index.service';
export class ZuiToastV2Component {
    constructor(zuiToastV2Service) {
        this.zuiToastV2Service = zuiToastV2Service;
        this.showClose = true;
        this.showBorder = true;
        this.close = () => {
            this.zuiToastV2Service.remove(this.activeToast.toastId);
        };
        this.zuiToastV2Service.getToast().subscribe(activeToast => {
            this.activeToast = activeToast;
        });
    }
    set hideClose(val) {
        this.showClose = ZuiB.toBoolReverse(val);
    }
    set noBorder(val) {
        this.showBorder = ZuiB.toBoolReverse(val);
    }
}
ZuiToastV2Component.decorators = [
    { type: Component, args: [{
                selector: 'zui-toast-v2',
                template: "<div class=\"zui-toast-item\" [class.zui-toast-item__shadow]=\"showBorder\">\n  <div class=\"d-flex\">\n    <div class=\"d-flex-1 zui-toast-item-color zui-toast-content\">\n      <ng-content></ng-content>\n    </div>\n    <mat-icon *ngIf=\"showClose\" class=\"zui-pointer zui-noselect zui-toast-item-close fs-18 lh-24\" (click)=\"close()\">close</mat-icon>\n  </div>\n</div>\n",
                styles: [".zui-toast-item{pointer-events:auto;margin-bottom:10px;border-radius:4px;padding:10px}.zui-toast-item__shadow{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px rgba(0,0,0,.1411764706),0 1px 18px rgba(0,0,0,.1215686275)}.zui-toast-item-close{color:#000;opacity:.5}.zui-toast-item-close:hover{opacity:1}.zui-toast-item-color{color:#000}"]
            },] }
];
ZuiToastV2Component.ctorParameters = () => [
    { type: ZUIToastV2Service }
];
ZuiToastV2Component.propDecorators = {
    hideClose: [{ type: Input }],
    noBorder: [{ type: Input }]
};
//# sourceMappingURL=index.component.js.map