/// <reference types="react" />
import { CommandRegistry } from '@lumino/commands';
import { Git } from './tokens';
/** Get the filename from a path */
export declare function extractFilename(path: string): string;
/**
 * Wrap mouse event handler to stop event propagation
 * @param fn Mouse event handler
 * @returns Mouse event handler that stops event from propagating
 */
export declare function stopPropagationWrapper(fn: (event?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void): (event?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
export declare function decodeStage(x: string, y: string): Git.Status;
/**
 * Returns a promise which resolves after a specified duration.
 *
 * @param ms - duration (in milliseconds)
 * @returns a promise
 */
export declare function sleep(ms: number): Promise<void>;
/**
 * A callback function to display a file diff between two commits.
 * @param commands the command registry.
 * @returns a callback function to display a file diff.
 */
export declare const openFileDiff: (commands: CommandRegistry) => (commit: Git.ISingleCommitInfo, previousCommit?: Git.ISingleCommitInfo) => (filePath: string, isText: boolean, previousFilePath?: string) => (event?: React.MouseEvent<HTMLLIElement, MouseEvent>) => Promise<void>;
