import type VersionVector from "../../crdt/VersionVector.ts";
import TrieBranch from "./TrieBranch.ts";
import type TrieGeometry from "./TrieGeometry.ts";
import TrieLeaf from "./TrieLeaf.ts";
import type { NibbleBits } from "../route/RouteKey.ts";
type LoadChildKind = "leaf" | "branch" | null;
export type TrieCompactorInit = {
    readonly geometry: TrieGeometry;
    readonly nibbleBits: NibbleBits;
    readonly loadRootIfNeeded: () => Promise<void>;
    readonly hasRoot: () => boolean;
    readonly leafAt: (path: readonly number[]) => TrieLeaf | null;
    readonly branchAt: (path: readonly number[]) => TrieBranch | null;
    readonly ensureChildLoaded: (parentPath: readonly number[], nibble: number, childOid: string) => Promise<LoadChildKind>;
    readonly markLeafDirty: (path: readonly number[], leaf: TrieLeaf) => void;
    readonly markBranchDirty: (path: readonly number[], branch: TrieBranch) => void;
    readonly clearLeafAt: (path: readonly number[]) => void;
    readonly clearBranchAt: (path: readonly number[]) => void;
};
export default class TrieCompactor {
    #private;
    constructor(init: TrieCompactorInit);
    compact(includedVV: VersionVector): Promise<void>;
}
export {};
