import * as i0 from '@angular/core'; import { OnInit, EventEmitter } from '@angular/core'; import { PositionSettings } from 'igniteui-angular/core'; import { IgxNotificationsDirective, ToggleViewEventArgs } from 'igniteui-angular/directives'; /** * **Ignite UI for Angular Snackbar** - * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/snackbar.html) * * The Ignite UI Snack Bar provides feedback about an operation with a single-line message, which can * include a link to an action such as Undo. * * Example: * ```html * *
* * Message sent * *
* ``` */ declare class IgxSnackbarComponent extends IgxNotificationsDirective implements OnInit { /** * Sets/gets the `id` of the snackbar. * If not set, the `id` of the first snackbar component will be `"igx-snackbar-0"`; * ```html * * ``` * ```typescript * let snackbarId = this.snackbar.id; * ``` * * @memberof IgxSnackbarComponent */ id: string; /** * The default css class applied to the component. * * @hidden * @internal */ cssClass: string; /** * Sets/gets the `actionText` attribute. * ```html * * ``` */ actionText?: string; /** * An event that will be emitted when the action button is clicked. * Provides reference to the `IgxSnackbarComponent` as an argument. * ```html * * ``` */ clicked: EventEmitter; /** * An event that will be emitted when the snackbar animation starts. * Provides reference to the `ToggleViewEventArgs` interface as an argument. * ```html * * ``` */ animationStarted: EventEmitter; /** * An event that will be emitted when the snackbar animation ends. * Provides reference to the `ToggleViewEventArgs` interface as an argument. * ```html * * ``` */ animationDone: EventEmitter; /** * Get the position and animation settings used by the snackbar. * ```typescript * @ViewChild('snackbar', { static: true }) public snackbar: IgxSnackbarComponent; * let currentPosition: PositionSettings = this.snackbar.positionSettings * ``` */ get positionSettings(): PositionSettings; /** * Set the position and animation settings used by the snackbar. * ```html * * ``` * ```typescript * import { slideInTop, slideOutBottom } from 'igniteui-angular'; * ... * @ViewChild('snackbar', { static: true }) public snackbar: IgxSnackbarComponent; * public newPositionSettings: PositionSettings = { * openAnimation: useAnimation(slideInTop, { params: { duration: '1000ms', fromPosition: 'translateY(100%)'}}), * closeAnimation: useAnimation(slideOutBottom, { params: { duration: '1000ms', fromPosition: 'translateY(0)'}}), * horizontalDirection: HorizontalAlignment.Left, * verticalDirection: VerticalAlignment.Middle, * horizontalStartPoint: HorizontalAlignment.Left, * verticalStartPoint: VerticalAlignment.Middle, * minSize: { height: 100, width: 100 } * }; * this.snackbar.positionSettings = this.newPositionSettings; * ``` */ set positionSettings(settings: PositionSettings); private _positionSettings; /** * Shows the snackbar and hides it after the `displayTime` is over if `autoHide` is set to `true`. * ```typescript * this.snackbar.open(); * ``` */ open(message?: string): void; /** * Opens or closes the snackbar, depending on its current state. * * ```typescript * this.snackbar.toggle(); * ``` */ toggle(): void; /** * @hidden */ triggerAction(): void; /** * @hidden */ ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @hidden * @deprecated * IMPORTANT: The following is NgModule exported for backwards-compatibility before standalone components */ declare class IgxSnackbarModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { IgxSnackbarComponent, IgxSnackbarModule };