/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { AnimationEvent } from '@angular/animations'; import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal'; import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, NgZone, OnDestroy } from '@angular/core'; import { Observable, Subject } from 'rxjs'; import { SCToastConfig } from './sc-toast-config'; import { SCToastService } from './sc-toast.service'; import * as i0 from "@angular/core"; /** * Internal component that wraps user-provided snack bar content. * @docs-private */ export declare class SCToastContainer extends BasePortalOutlet implements OnDestroy { private _ngZone; private _elementRef; private _changeDetectorRef; /** The snack bar configuration. */ toastConfig: SCToastConfig; private toastService; onLeave(e: MouseEvent): void; onEnter(e: MouseEvent): void; /** Whether the component has been destroyed. */ private _destroyed; /** The portal outlet inside of this container into which the snack bar content will be loaded. */ _portalOutlet: CdkPortalOutlet; /** Subject for notifying that the snack bar has exited from view. */ readonly _onExit: Subject; /** Subject for notifying that the snack bar has finished entering the view. */ readonly _onEnter: Subject; /** The state of the snack bar animations. */ _animationState: string; /** ARIA role for the snack bar container. */ _role: 'alert' | 'status' | null; constructor(_ngZone: NgZone, _elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, /** The snack bar configuration. */ toastConfig: SCToastConfig, toastService: SCToastService); handleMouseEnter(): void; handleMouseLeave(): void; /** Attach a component portal as content to this snack bar container. */ attachComponentPortal(portal: ComponentPortal): ComponentRef; /** Attach a template portal as content to this snack bar container. */ attachTemplatePortal(portal: TemplatePortal): EmbeddedViewRef; /** * Attaches a DOM portal to the snack bar container. * @deprecated To be turned into a method. * @breaking-change 10.0.0 */ /** Handle end of animations, updating the state of the snackbar. */ onAnimationEnd(event: AnimationEvent): void; /** Begin animation of snack bar entrance into view. */ enter(): void; /** Begin animation of the snack bar exiting from view. */ exit(): Observable; /** Makes sure the exit callbacks have been invoked when the element is destroyed. */ ngOnDestroy(): void; /** * Waits for the zone to settle before removing the element. Helps prevent * errors where we end up removing an element which is in the middle of an animation. */ private _completeExit; /** Applies the various positioning and user-configured CSS classes to the snack bar. */ private _applyToastClasses; /** Asserts that no content is already attached to the container. */ private _assertNotAttached; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }