/**
 * A toolkit hook to trigger an request to start a process and execute a pooling operation to validate when the operation is finished
 */
/**
 * This hook helps run a task and then check repeatedly if it's done.
 * It combines starting a process with waiting for it to finish.
 */
export default function usePooledOperation(): {
    /** Indicates when it's loading */
    loading: boolean;
    /** Indicates error of pooling or request */
    error: boolean;
    /** Retries the operation based on the current failed step */
    retry: (() => void) | undefined;
    /** Initiates the request followed by the pooling operation */
    start: (_requestOperation: () => Promise<void>, _poolingOperation: () => Promise<boolean>) => void;
    /** Clear any error that is registered */
    clearError: () => void;
};
