import * as rxjs from 'rxjs'; import { Subject } from 'rxjs'; import { AnimationEvent } from '@angular/animations'; import { Overlay, ComponentType } from '@angular/cdk/overlay'; import * as i0 from '@angular/core'; import { TemplateRef, OnInit, EventEmitter, ChangeDetectorRef, DestroyRef, Injector } from '@angular/core'; import { MessageConfig, NzConfigService } from 'ng-zorro-antd/core/config'; import { NzSingletonService } from 'ng-zorro-antd/core/services'; import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { Direction } from '@angular/cdk/bidi'; /** * 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 NzMessageType = 'success' | 'info' | 'warning' | 'error' | 'loading'; type NzMessageContentType = string | TemplateRef; interface NzMessageDataOptions { nzDuration?: number; nzAnimate?: boolean; nzPauseOnHover?: boolean; nzData?: NzSafeAny; } interface NzMessageData { type?: NzMessageType | string; content?: NzMessageContentType; messageId?: string; createdAt?: Date; options?: NzMessageDataOptions; state?: 'enter' | 'leave'; onClose?: Subject; } type NzMessageRef = Pick, 'onClose' | 'messageId'>; declare abstract class NzMNService { protected abstract componentPrefix: string; protected container?: T; protected nzSingletonService: NzSingletonService; protected overlay: Overlay; protected injector: Injector; remove(id?: string): void; protected getInstanceId(): string; protected withContainer(ctor: ComponentType): T; } declare abstract class NzMNContainerComponent { config?: Required; instances: Array>; private readonly _afterAllInstancesRemoved; readonly afterAllInstancesRemoved: rxjs.Observable; protected cdr: ChangeDetectorRef; protected nzConfigService: NzConfigService; constructor(); create(data: D): Required; remove(id: string, userAction?: boolean): void; removeAll(): void; protected onCreate(instance: D): Required; protected onRemove(instance: Required, userAction: boolean): void; private onAllInstancesRemoved; protected readyInstances(): void; protected abstract subscribeConfigChange(): void; protected mergeOptions(options?: D['options']): D['options']; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, {}, {}, never, never, true, never>; } declare abstract class NzMNComponent implements OnInit { abstract instance: Required; abstract index?: number; abstract destroyed: EventEmitter<{ id: string; userAction: boolean; }>; protected cdr: ChangeDetectorRef; protected destroyRef: DestroyRef; readonly animationStateChanged: Subject; protected options: Required; protected autoClose?: boolean; protected closeTimer?: ReturnType; protected userAction: boolean; protected eraseTimer?: ReturnType; protected eraseTimingStart?: number; protected eraseTTL: number; constructor(); ngOnInit(): void; onEnter(): void; onLeave(): void; protected destroy(userAction?: boolean): void; private initErase; private updateTTL; private startEraseTimeout; private clearEraseTimeout; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 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 NzMessageContainerComponent extends NzMNContainerComponent { dir: Direction; top?: string | null; constructor(); protected subscribeConfigChange(): void; protected updateConfig(): void; 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 NzMessageComponent extends NzMNComponent implements OnInit { instance: Required; readonly destroyed: EventEmitter<{ id: string; userAction: boolean; }>; index?: number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NzMessageService extends NzMNService { protected componentPrefix: string; success(content: NzMessageContentType, options?: NzMessageDataOptions): NzMessageRef; error(content: NzMessageContentType, options?: NzMessageDataOptions): NzMessageRef; info(content: NzMessageContentType, options?: NzMessageDataOptions): NzMessageRef; warning(content: NzMessageContentType, options?: NzMessageDataOptions): NzMessageRef; loading(content: NzMessageContentType, options?: NzMessageDataOptions): NzMessageRef; create(type: NzMessageType | string, content: NzMessageContentType, options?: NzMessageDataOptions): NzMessageRef; private createInstance; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { NzMNComponent, NzMNContainerComponent, NzMNService, NzMessageComponent, NzMessageContainerComponent, NzMessageService }; export type { NzMessageContentType, NzMessageData, NzMessageDataOptions, NzMessageRef, NzMessageType };