import { Observable } from 'rxjs'; import * as i0 from '@angular/core'; import { OnInit, OnDestroy, EnvironmentInjector, EventEmitter, Type, Provider } from '@angular/core'; import { SkyDynamicComponentService, SkyDynamicComponentLegacyService } from '@skyux/core'; declare class SkyToastInstance { #private; /** * An observable that indicates when the toast is closed. */ get closed(): Observable; constructor(); /** * Closes the toast component. */ close(): void; } declare enum SkyToastType { /** * Sets the toast's icon and background color to the `danger` style. */ Danger = 0, /** * Sets the toast's icon and background color to the `info` style. */ Info = 1, /** * Sets the toast's icon and background color to the `success` style. */ Success = 2, /** * Sets the toast's icon and background color to the `warning` style. */ Warning = 3 } /** * @internal */ declare class SkyToastComponent implements OnInit, OnDestroy { #private; /** * Whether to automatically close the toast. Only close toasts * automatically if users can access the messages after the toasts close. */ autoClose: boolean | undefined; /** * The environment injector created for this toast's body component. * Destroyed in `ngOnDestroy` so that cleanup is deferred until after * the leave animation completes. */ readonly environmentInjector: i0.InputSignal; /** * The `SkyToastType` type for the toast to determine the color and icon to display. */ set toastType(value: SkyToastType | undefined); /** * Fires when the toast closes. */ closed: EventEmitter; get isOpen(): boolean; ariaLive: string; ariaRole: string | undefined; classNames: string; iconName: string; toastTypeOrDefault: SkyToastType; ngOnInit(): void; ngOnDestroy(): void; close(): void; startAutoCloseTimer(): void; stopAutoCloseTimer(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SkyToastModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Specifies the configuration options to set up a toast. */ interface SkyToastConfig { /** * The `SkyToastType` type that determines the color and icon for the toast. This property defaults to `Info`. */ type?: SkyToastType; /** * Whether to automatically close the toast. Only close toasts * automatically if users can access the messages after the toasts close. */ autoClose?: boolean; } /** * @internal */ declare class SkyToast { #private; get bodyComponent(): Type; get bodyComponentProviders(): Provider[]; get config(): SkyToastConfig | undefined; get instance(): SkyToastInstance; isRendered: boolean; toastId: number; constructor(bodyComponent: Type, bodyComponentProviders: Provider[], instance: SkyToastInstance, config?: SkyToastConfig); } declare class SkyToastService implements OnDestroy { #private; private static host; private static toasts; private static toastStream; /** * @internal */ get toastStream(): Observable; constructor(dynamicComponentService: SkyDynamicComponentService); ngOnDestroy(): void; /** * Opens a new toast and displays the specified message. * @param message Specifies the text to display in the toast. * @param config Specifies additional configuration options for the toast. */ openMessage(message: string, config?: SkyToastConfig): SkyToastInstance; /** * Opens a new toast using a custom component. * @param component Specifies an Angular component to inject into the toast body, * @param config Specifies additional configuration options for the toast. * @param providers Specifies an array of custom providers to pass to the custom component's * constructor. */ openComponent(component: Type, config?: SkyToastConfig, providers?: Provider[]): SkyToastInstance; /** * Closes all active toast components. */ closeAll(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @internal * @deprecated Use `SkyToastService` to open a standalone component instead. */ declare class SkyToastLegacyService extends SkyToastService { constructor(dynamicComponentSvc: SkyDynamicComponentLegacyService); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare enum SkyToastDisplayDirection { /** * Displays new toasts below previous toasts. */ OldestOnTop = 0, /** * Displays new toasts on top of previous toasts. */ NewestOnTop = 1 } /** * Global configuration options for displaying toast components. */ declare class SkyToastContainerOptions { /** * Order in which toasts should appear in the page's toast container. */ displayDirection: SkyToastDisplayDirection | undefined; } export { SkyToastContainerOptions, SkyToastDisplayDirection, SkyToastInstance, SkyToastLegacyService, SkyToastModule, SkyToastService, SkyToastType, SkyToastComponent as λ1 }; export type { SkyToastConfig };