import * as GQL from '../backend/graphqlschema';
/** TreeEntryInfo is the information we need to render an entry in the file tree */
export interface TreeEntryInfo {
    path: string;
    name: string;
    isDirectory: boolean;
    commit: GQL.IGitCommit;
    repository: GQL.IRepository;
    url: string;
    submodule: GQL.ISubmodule | null;
    isSingleChild: boolean;
}
export interface SingleChildGitTree extends TreeEntryInfo {
    children: SingleChildGitTree[];
}
export declare function scrollIntoView(el: Element, scrollRoot: Element): void;
export declare const getDomElement: (path: string) => Element | null;
export declare const treePadding: (depth: number, isTree: boolean) => {
    marginLeft: string;
    paddingRight: string;
};
export declare const maxEntries = 2500;
/** This function converts nested entries into a proper tree-like object. When we have single-child directories,
 * the backend responds with all entries that need to be rendered, not just the entry for that level. It is in
 * a flat list, so this function converts it to a structure like the following (assume we have a/b/c.txt):
 *
 *
 * { name: "a", ...TreeEntryInfo, children: [
 *     { name: "b", ...TreeEntryInfo, children: [
 *          {name: "c.txt", ...TreeEntryInfo, children: []}
 *     ]}
 * ]}
 *
 * It uses the number of '/' separators to determine depth, and recursively adds entries to the `children` field.
 */
export declare function singleChildEntriesToGitTree(entries: TreeEntryInfo[]): SingleChildGitTree;
/** Determines whether a Tree has single-child directories as children, in order to determine whether to render a SingleChildTreeLayer or TreeLayer */
export declare function hasSingleChild(tree: TreeEntryInfo[]): boolean;
//# sourceMappingURL=util.d.ts.map