import { ComponentRef, Injector, NgZone } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { Observable } from 'rxjs'; import { Overlay } from '../overlay/overlay'; import { ToastRef } from './toast-ref'; import { ToastContainerDirective } from './toast.directive'; import { GlobalConfig, IndividualConfig, ToastToken } from './toastr-config'; import * as i0 from "@angular/core"; export interface ActiveToast { /** Your Toast ID. Use this to close it individually */ toastId: number; /** the title of your toast. Stored to prevent duplicates */ title: string; /** the message of your toast. Stored to prevent duplicates */ message: string; /** a reference to the component see portal.ts */ portal: ComponentRef; /** a reference to your toast */ toastRef: ToastRef; /** triggered when toast is active */ onShown: Observable; /** triggered when toast is destroyed */ onHidden: Observable; /** triggered on toast click */ onTap: Observable; /** available for your use in custom toast */ onAction: Observable; } export declare class ToastrService { private overlay; private _injector; private sanitizer; private ngZone; toastrConfig: GlobalConfig; currentlyActive: number; toasts: ActiveToast[]; overlayContainer?: ToastContainerDirective; previousToastMessage: string | undefined; private index; constructor(token: ToastToken, overlay: Overlay, _injector: Injector, sanitizer: DomSanitizer, ngZone: NgZone); /** show toast */ show(message?: string, title?: string, override?: Partial>, type?: string): ActiveToast; /** show successful toast */ success(message?: string, title?: string, override?: Partial>): ActiveToast; /** show error toast */ error(message?: string, title?: string, override?: Partial>): ActiveToast; /** show info toast */ info(message?: string, title?: string, override?: Partial>): ActiveToast; /** show warning toast */ warning(message?: string, title?: string, override?: Partial>): ActiveToast; /** * Remove all or a single toast by id */ clear(toastId?: number): void; /** * Remove and destroy a single toast by id */ remove(toastId: number): boolean; /** * Determines if toast message is already shown */ findDuplicate(title: string, message: string, resetOnDuplicate: boolean, countDuplicates: boolean): ActiveToast; /** create a clone of global config and apply individual settings */ private applyConfig; /** * Find toast object by id */ private _findToast; /** * Determines the need to run inside angular's zone then builds the toast */ private _preBuildNotification; /** * Creates and attaches toast data to component * returns the active toast, or in case preventDuplicates is enabled the original/non-duplicate active toast. */ private _buildNotification; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }