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 BranchPathType = {
    start: number;
    end: number;
    endCommitHash: string;
    endCommit?: CommitNode;
    color?: string;
    branchOrder: number;
};
type Branch = {
    name: string;
    commit: {
        sha: string;
    };
    link?: string;
};
type GraphStyle = {
    commitSpacing: number;
    branchSpacing: number;
    branchColors: string[];
    nodeRadius: number;
};
type ChangedItem = {
    filename: string;
    status: string;
    additions?: number;
    deletions?: number;
    patch?: string;
    blob_url?: string;
};
type Diff = {
    files?: ChangedItem[];
    tables?: ChangedItem[];
};

type Props$2 = {
    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$2): React.JSX.Element;

type Props$1 = {
    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>;
    forDolt?: boolean;
};
declare function CommitGraph({ commits, graphStyle, branchHeads, dateFormatFn, currentBranch, fullSha, onCommitClick, getDiff, forDolt, }: Props$1): React.JSX.Element;
declare namespace CommitGraph {
    var WithInfiniteScroll: typeof WithInfiniteScroll;
}

type Props = {
    commit: Commit;
    diff?: Diff;
    forDolt?: boolean;
    loading?: boolean;
};
declare function DiffSection({ commit, diff, forDolt, loading }: Props): React.JSX.Element;

export { type Branch, type BranchPathType, type ChangedItem, type Commit, CommitGraph, type CommitNode, type Diff, DiffSection, type GraphStyle };
