/**
 * Thrown by sendActionSafely after the user has already been notified via toast.
 * DialogsProvider button handlers check for this class to suppress their own
 * generic fallback "action-error" toast, preventing duplicate notifications.
 */
export declare class AlreadyHandledError extends Error {
    name: string;
    readonly cause: unknown;
    constructor(cause?: unknown);
}
type SafeFunction = {
    <TResult>(fn: () => Promise<TResult>, options?: SafeCallOptions): Promise<TResult>;
    <TResult>(fn: () => TResult, options?: SafeCallOptions): TResult;
};
type SafeCallOptions = {
    suppressErrorNotification?: (error: unknown) => boolean;
};
/**
 * React hook that wraps unstable or error-prone functions to provide consistent error handling.
 *
 * Instead of allowing functions to fail silently (e.g., when a user doesn't have a camera or microphone),
 * this hook catches errors and displays a user-friendly notification using the DialogsProvider.
 *
 * @returns A callback function that accepts either a sync or async function, executes it safely,
 * and handles both synchronous and asynchronous errors by:
 * - Displaying a notification to the user with the error details
 * - Re-throwing the error for additional handling if needed
 *
 * @example
 * ```tsx
 * const safe = useSafeCall()
 *
 * // Async function:
 * await safe(() => localVideo.start(activeCameraId))
 *
 * // Sync function:
 * const x = safe(() => unsafeOperation())
 * ```
 */
export declare const useSafeCall: () => SafeFunction;
export {};
