import * as i0 from '@angular/core'; import { TemplateRef, EventEmitter } from '@angular/core'; import { NzMNComponent, NzMNContainerComponent, NzMNService } from 'ng-zorro-antd/message'; import { Subject } from 'rxjs'; import { NzSafeAny, NgStyleInterface, NgClassInterface } from 'ng-zorro-antd/core/types'; import { Direction } from '@angular/cdk/bidi'; import { NotificationConfig } from 'ng-zorro-antd/core/config'; /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ type NzNotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'top' | 'bottom'; type NzNotificationContentType = string | TemplateRef; interface NzNotificationDataOptions { nzKey?: string; nzStyle?: NgStyleInterface; nzClass?: NgClassInterface | string; nzCloseIcon?: TemplateRef | string; nzButton?: TemplateRef<{ $implicit: NzNotificationComponent; }>; nzPlacement?: NzNotificationPlacement; nzData?: T; nzDuration?: number; nzAnimate?: boolean; nzPauseOnHover?: boolean; } interface NzNotificationData { title?: string | TemplateRef; content?: NzNotificationContentType; createdAt?: Date; messageId?: string; options?: NzNotificationDataOptions; state?: 'enter' | 'leave'; template?: TemplateRef<{}>; type?: 'success' | 'info' | 'warning' | 'error' | 'blank' | string; onClose?: Subject; onClick?: Subject; } type NzNotificationRef = Pick, 'onClose' | 'onClick' | 'messageId'>; declare class NzNotificationComponent extends NzMNComponent { instance: Required; index: number; placement?: string; readonly destroyed: EventEmitter<{ id: string; userAction: boolean; }>; constructor(); onClick(event: MouseEvent): void; close(): void; get state(): string | undefined; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzNotificationContainerComponent extends NzMNContainerComponent { dir: Direction; bottom?: string | null; top?: string | null; topLeftInstances: Array>; topRightInstances: Array>; bottomLeftInstances: Array>; bottomRightInstances: Array>; topInstances: Array>; bottomInstances: Array>; constructor(); create(notification: NzNotificationData): Required; protected onCreate(instance: NzNotificationData): Required; protected subscribeConfigChange(): void; protected updateConfig(): void; private replaceNotification; protected readyInstances(): void; protected mergeOptions(options?: NzNotificationDataOptions): NzNotificationDataOptions; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzNotificationService extends NzMNService { protected componentPrefix: string; success(title: string | TemplateRef, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef; error(title: string | TemplateRef, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef; info(title: string | TemplateRef, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef; warning(title: string | TemplateRef, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef; blank(title: string | TemplateRef, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef; create(type: 'success' | 'info' | 'warning' | 'error' | 'blank' | string, title: string | TemplateRef, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef; template(template: TemplateRef<{ $implicit: NzNotificationComponent; data: NzSafeAny; }>, options?: NzNotificationDataOptions): NzNotificationRef; protected generateMessageId(): string; private createInstance; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { NzNotificationComponent, NzNotificationContainerComponent, NzNotificationService }; export type { NzNotificationContentType, NzNotificationData, NzNotificationDataOptions, NzNotificationPlacement, NzNotificationRef };