import { Component, ViewEncapsulation, Input, TemplateRef, NgZone } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../icon/icon.component";
import * as i2 from "@angular/common";
export class ToastComponent {
    constructor(_zone) {
        this._zone = _zone;
        this.prefixCls = 'am-toast';
        this.isContentString = true;
        this.transitionName = 'am-fade-enter am-fade-enter-active';
        this._iconType = '';
        this._content = '';
        this.mask = true;
        this.position = 'middle';
    }
    get content() {
        return this._content;
    }
    set content(value) {
        if (value instanceof TemplateRef) {
            this.isContentString = false;
        }
        else {
            this.isContentString = true;
        }
        this._zone.run(() => {
            this._content = value;
        });
    }
    get iconType() {
        return this._iconType;
    }
    set iconType(value) {
        this._zone.run(() => {
            this._iconType = value;
        });
    }
}
ToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ToastComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
ToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ToastComponent, selector: "Toast", inputs: { mask: "mask", content: "content", iconType: "iconType", position: "position" }, host: { properties: { "class.am-toast": "true", "class.am-toast-mask": "mask", "class.am-toast-mask-top": "mask && position === 'top'", "class.am-toast-mask-middle": "mask && position === 'middle'", "class.am-toast-mask-bottom": "mask && position === 'bottom'", "class.am-toast-nomask": "!mask", "class.am-toast-nomask-top": "!mask && position === 'top'", "class.am-toast-nomask-middle": "!mask && position === 'middle'", "class.am-toast-nomask-bottom": "!mask && position === 'bottom'" } }, ngImport: i0, template: "<div class=\"{{ prefixCls }}-notice {{ prefixCls }}-notice-closable {{ transitionName }}\">\n  <div class=\"{{ prefixCls }}-notice-content\">\n    <div role=\"alert\" *ngIf=\"iconType\" class=\"{{ prefixCls }}-text {{ prefixCls }}-text-icon\" aria-live=\"assertive\">\n      <Icon [type]=\"iconType\" [size]=\"'lg'\"></Icon>\n      <div *ngIf=\"isContentString\" class=\"{{ prefixCls }}-text-info\">{{ content }}</div>\n    </div>\n    <div *ngIf=\"!iconType\" class=\"{{ prefixCls }}-text\" role=\"alert\" aria-live=\"assertive\">\n      <div *ngIf=\"isContentString\" class=\"{{ prefixCls }}-text-info\">{{ content }}</div>\n      <ng-template *ngIf=\"!isContentString\" [ngTemplateOutlet]=\"content\"></ng-template>\n    </div>\n  </div>\n  <a class=\"{{ prefixCls }}-notice-close\">\n    <span class=\"{{ prefixCls }}-notice-close-x\"></span>\n  </a>\n</div>\n", components: [{ type: i1.IconComponent, selector: "Icon, nzm-icon", inputs: ["color", "type", "src", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ToastComponent, decorators: [{
            type: Component,
            args: [{ selector: 'Toast', encapsulation: ViewEncapsulation.None, host: {
                        '[class.am-toast]': 'true',
                        '[class.am-toast-mask]': 'mask',
                        '[class.am-toast-mask-top]': `mask && position === 'top'`,
                        '[class.am-toast-mask-middle]': `mask && position === 'middle'`,
                        '[class.am-toast-mask-bottom]': `mask && position === 'bottom'`,
                        '[class.am-toast-nomask]': '!mask',
                        '[class.am-toast-nomask-top]': `!mask && position === 'top'`,
                        '[class.am-toast-nomask-middle]': `!mask && position === 'middle'`,
                        '[class.am-toast-nomask-bottom]': `!mask && position === 'bottom'`
                    }, template: "<div class=\"{{ prefixCls }}-notice {{ prefixCls }}-notice-closable {{ transitionName }}\">\n  <div class=\"{{ prefixCls }}-notice-content\">\n    <div role=\"alert\" *ngIf=\"iconType\" class=\"{{ prefixCls }}-text {{ prefixCls }}-text-icon\" aria-live=\"assertive\">\n      <Icon [type]=\"iconType\" [size]=\"'lg'\"></Icon>\n      <div *ngIf=\"isContentString\" class=\"{{ prefixCls }}-text-info\">{{ content }}</div>\n    </div>\n    <div *ngIf=\"!iconType\" class=\"{{ prefixCls }}-text\" role=\"alert\" aria-live=\"assertive\">\n      <div *ngIf=\"isContentString\" class=\"{{ prefixCls }}-text-info\">{{ content }}</div>\n      <ng-template *ngIf=\"!isContentString\" [ngTemplateOutlet]=\"content\"></ng-template>\n    </div>\n  </div>\n  <a class=\"{{ prefixCls }}-notice-close\">\n    <span class=\"{{ prefixCls }}-notice-close-x\"></span>\n  </a>\n</div>\n" }]
        }], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { mask: [{
                type: Input
            }], content: [{
                type: Input
            }], iconType: [{
                type: Input
            }], position: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 