import React from 'react';

type ParentCommit = {
    sha: string;
};
type Commit = {
    sha: string;
    commit: {
        author: {
            name: string;
            date: string | number | Date;
            email?: string;
        };
        message: string;
    };
    parents: ParentCommit[];
    html_url?: string;
};
type CommitNode = {
    hash: string;
    children: string[];
    parents: string[];
    committer: string;
    commitDate: Date;
    author?: string;
    authorDate?: Date;
    message?: string;
    x: number;
    y: number;
    commitColor: string;
    commitLink?: string;
};
type Branch = {
    name: string;
    commit: {
        sha: string;
    };
    link?: string;
};
type GraphStyle = {
    commitSpacing: number;
    branchSpacing: number;
    branchColors: string[];
    nodeRadius: number;
};
type ChangedFile = {
    filename: string;
    status: string;
    additions: number;
    deletions: number;
    patch?: string;
    blob_url?: string;
};
type Diff = {
    files: ChangedFile[];
};

type Props$1 = {
    commits: Commit[];
    branchHeads: Branch[];
    loadMore: () => void;
    hasMore: boolean;
    parentID?: string;
    graphStyle?: GraphStyle;
    dateFormatFn?: (d: string | number | Date) => string;
    currentBranch?: string;
    fullSha?: boolean;
    onCommitClick?: (commit: CommitNode) => void;
    getDiff?: (base: string, head: string) => Promise<Diff | undefined>;
};
declare function WithInfiniteScroll(props: Props$1): React.JSX.Element;

type Props = {
    commits: Commit[];
    branchHeads: Branch[];
    graphStyle?: GraphStyle;
    dateFormatFn?: (d: string | number | Date) => string;
    currentBranch?: string;
    fullSha?: boolean;
    onCommitClick?: (commit: CommitNode) => void;
    getDiff?: (base: string, head: string) => Promise<Diff | undefined>;
};
declare function CommitGraph({ commits, graphStyle, branchHeads, dateFormatFn, currentBranch, fullSha, onCommitClick, getDiff, }: Props): React.JSX.Element;
declare namespace CommitGraph {
    var WithInfiniteScroll: typeof WithInfiniteScroll;
}

export { CommitGraph };
