import "./ToastStyling.scss";
import * as React from "react";
/**
* View Message of the Toast Notification
*/
export declare type IToastLink = {
/**
* Either the URL to be novaigated to, or the callback to be executed when clicking the tag.
*/
url: (() => void) | string;
/**
* Text of the tag
*/
title: string;
};
/**
* Toast Property Interface
*/
export declare type IToastProps = {
/**
* Text of the Notification Message
*/
text: string;
/**
* Category of the Toast, which controls the border color, as well as the category icon.
*/
category: "informational" | "error" | "success";
/**
* The Type of the Toast.
* Persisting Toasts will not be closed automatically, and will contain a close button.
* Temporary Toasts will automatically close after 7 seconds and will not contain a close button.
*/
type: "persisting" | "temporary";
/**
* Boolean indicating when the toast is visible.
* When false, will close the Toast and call onRemove when finished closing.
*/
isVisible: boolean;
/**
* Duration of the toast.
* By default, the toast will close after 7 seconds.
*/
duration?: number;
/**
* Boolean indicating when the close button is visible.
* When false, the toast will not have any close button.
*/
hasCloseButton?: boolean;
/**
* A URL or Callback that can be used to add additional information to a Toast
*/
link?: IToastLink;
/**
* Function called when the toast is all the way closed.
*/
onRemove?: () => void;
};
/**
* Toast Property States
*/
declare type IToastState = {
isVisible: boolean;
height: number;
};
/**
* Generic Toast Notification Component
* +++++
* {alert("Link callback")}, title:"View the report"}} />
*
*
*
*
*/
export declare class Toast extends React.Component {
private closeTimeout;
constructor(props: IToastProps);
render(): JSX.Element;
componentDidMount(): void;
componentWillUnmount(): void;
componentDidUpdate(prevProps: IToastProps): void;
/**
* Close the Toast Notification
*/
private close;
/**
* Category Management Function for proper Notification Icon
* Return the Status Icon according to the category prop
*/
private getCategoryIcon;
/**
* Set the Timer to close the Toast Notification after 7 seconds
*/
private setCloseTimeout;
/**
* Remove the Timer to close the Toast Notification (if its exists)
*/
private clearCloseTimeout;
private onRef;
}
export default Toast;