import { LiveAnnouncer } from '@angular/cdk/a11y'; import { Overlay } from '@angular/cdk/overlay'; import { ComponentType } from '@angular/cdk/portal'; import { EmbeddedViewRef, InjectionToken, Injector, OnDestroy, TemplateRef, Type } from '@angular/core'; import { ITextOnlySnackBar } from './simple-snack-bar.component'; import { BaoSnackBarConfig } from './snack-bar-config'; import { IBaoSnackBarContainer } from './snack-bar-container'; import { BaoSnackBarRef } from './snack-bar-ref'; import * as i0 from "@angular/core"; export declare function baoFactory(): BaoSnackBarConfig; /** Injection token that can be used to specify default snack bar. */ export declare const BAO_SNACK_BAR_DEFAULT_OPTIONS: InjectionToken>; /** * Service to dispatch Material Design snack bar messages. */ export declare class BaoSnackBarService implements OnDestroy { private _overlay; private _live; private _injector; private _parentSnackBar; private _defaultConfig; /** The component that should be rendered as the snack bar's simple component. */ protected simpleSnackBarComponent: Type; /** The container component that attaches the provided template or component. */ protected snackBarContainerComponent: Type; /** * Reference to the current snack bar in the view *at this level* (in the Angular injector tree). * If there is a parent snack-bar service, all operations should delegate to that parent * via `_openedSnackBarRef`. */ private _snackBarRefAtThisLevel; constructor(_overlay: Overlay, _live: LiveAnnouncer, _injector: Injector, _parentSnackBar: BaoSnackBarService, _defaultConfig: BaoSnackBarConfig); /** Reference to the currently opened snackbar at *any* level. */ get _openedSnackBarRef(): BaoSnackBarRef | null; set _openedSnackBarRef(value: BaoSnackBarRef | null); /** * Creates and dispatches a snack bar with a custom component for the content, removing any * currently opened snack bars. * * @param component Component to be instantiated. * @param config Extra configuration for the snack bar. */ openFromComponent(component: ComponentType, config?: BaoSnackBarConfig): BaoSnackBarRef; /** * Creates and dispatches a snack bar with a custom template for the content, removing any * currently opened snack bars. * * @param template Template to be instantiated. * @param config Extra configuration for the snack bar. */ openFromTemplate(template: TemplateRef, config?: BaoSnackBarConfig): BaoSnackBarRef>; /** * Opens a snackbar with a message and an optional action. * @param message The message to show in the snackbar. * @param toastType The type of of toast to display the snackbar. * @param actionLabelOrIcon The label or icon for the snackbar action. * @param showClose If true, the snackbar will require user interaction to close. * @param config Additional configuration options for the snackbar. */ open(config: BaoSnackBarConfig): BaoSnackBarRef; /** * Dismisses the currently-visible snack bar. */ dismiss(): void; ngOnDestroy(): void; /** * Attaches the snack bar container component to the overlay. */ private attachSnackBarContainer; /** * Places a new component or a template as the content of the snack bar container. */ private attach; /** Animates the old snack bar out and the new one in. */ private animateSnackBar; /** * Creates a new overlay and places it in the correct location. * @param config The user-specified snack bar config. */ private createOverlay; /** * Creates an injector to be used inside of a snack bar component. * @param config Config that was used to create the snack bar. * @param snackBarRef Reference to the snack bar. */ private createInjector; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }