import { EventEmitter } from '../../stencil-public-runtime'; import { ThemeVariantType } from "../../type/variant"; import { ToneMinimalVariantType } from "../../type/tone"; import { MdsToastCloseEventDetail } from './meta/event-detail'; import { ToastPosition } from './meta/types'; /** * @slot - Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here. * @slot icon - Insert an icon image, it can be `HTML elements` or `components`, it is **recommended** to add `mds-icon` element. * @slot action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element. * @category feedback */ export declare class MdsToast { private dismissTimer?; private closeTimer?; private cssDismissAnimationDuration; private hasText?; private remaining?; private countdownStart; private pointerInside; private focusInside; private closeReason; private t; hostElement: HTMLMdsToastElement; hasActions: boolean; stacked: boolean; /** * If set, specifies the visibility duration in milliseconds of the element inside the viewport, when the time is up the visible property will be set to false. The countdown waits while the pointer is over the toast or the focus is inside it. If the duration is set to 0 the toast stays until it is hidden: give it `dismissible` so the person can hide it too. */ readonly duration?: number; /** * Specifies if toast is visible at the bottom or not */ visible?: boolean; /** * Sets the theme variant colours */ readonly variant?: ThemeVariantType; /** * Sets the tone of the color variant */ readonly tone?: ToneMinimalVariantType; /** * Sets position of toast */ readonly position: ToastPosition; /** * Shows a button that hides the toast, an arrow towards the edge the toast leaves by */ readonly dismissible?: boolean; /** * Shows the hide button, as `dismissible` does. * @deprecated Use `dismissible`: the button dismisses the message, it deletes nothing. * Goes in the next major. */ readonly deletable?: boolean; /** * Emits once the toast is hidden and its exit animation is over, whoever hid it: the `reason` of * the detail says who, `timeout`, `close` (the person, with the hide button) or `hide` (the application) */ closedEvent: EventEmitter; private updateCSSCustomProps; private hasDuration; private stopCountdown; private runCountdown; private holdCountdown; /** * While the toast is visible with a duration, one countdown hides it when the time is up, and * mdsToastClose follows once the exit animation is over. The countdown is one-shot: it was an * interval that nobody stopped, so a dismissed toast emitted mdsToastClose again every * `duration`. Hiding the toast, showing it again or changing the duration starts from scratch. * The countdown waits while the pointer is over the toast or the focus is inside it, so its * action is not taken away while the person is reaching it (WCAG 2.2.1). */ private reloadTimeListeners; private hide; private onCloseClick; private onPointerEnter; private onPointerLeave; private onFocusIn; private onFocusOut; private closeButtonVariant; connectedCallback(): void; disconnectedCallback(): void; private onActionSlotChange; componentWillLoad(): void; componentDidLoad(): void; visibleChanged(visible: boolean, wasVisible?: boolean): void; durationChanged(): void; render(): any; }