import * as React from 'react'; export type FeedbackOptions = { type: 'toast'; successContent?: React.ReactNode; failContent?: React.ReactNode; duration?: number; } | { type: 'notification'; notificationLabels?: string | { inProgress: string; failed?: string | ((e: any) => string); success?: string; }; }; /** * #performAction * use this function to execute any async action that requires a feedback. * @param action the action to execute. * @param feedbackOptions feedback options to determine which kind of feedback to present * @param additionalData !Optional! any additional data the notification/toast might need * @param throwBackError !Optional! if true, will throw error back outside the action */ export declare function performAction(action: () => Promise, feedbackOptions: FeedbackOptions, additionalData?: any, throwBackError?: boolean, skipToast?: boolean): Promise; export declare const asyncHandler: { notification: (title: string | { inProgress: string; failed?: string | ((e: any) => string); success?: string; }, action: () => Promise) => Promise; toast: { simple: (action: () => Promise, successMessage?: React.ReactNode, errorMessage?: React.ReactNode) => Promise; onSuccess: (action: () => Promise, successMessage?: React.ReactNode) => Promise; }; };