import BaseTree from "../base/tree.js";
import MMPT from "../protocol/private/mmpt.js";
import PrivateFile from "./PrivateFile.js";
import PrivateHistory from "./PrivateHistory.js";
import { Links, SoftLink, UpdateCallback } from "../types.js";
import { DecryptedNode, PrivateSkeletonInfo, PrivateTreeInfo, PrivateAddResult, PrivateLink } from "../protocol/private/types.js";
import { FileContent } from "../../ipfs/index.js";
import { Path } from "../../path.js";
import { PrivateName, BareNameFilter } from "../protocol/private/namefilter.js";
import { Maybe } from "../../common/index.js";
declare type ConstructorParams = {
    header: PrivateTreeInfo;
    key: string;
    mmpt: MMPT;
};
export default class PrivateTree extends BaseTree {
    children: {
        [name: string]: PrivateTree | PrivateFile;
    };
    header: PrivateTreeInfo;
    history: PrivateHistory;
    key: string;
    mmpt: MMPT;
    constructor({ mmpt, key, header }: ConstructorParams);
    static instanceOf(obj: unknown): obj is PrivateTree;
    static create(mmpt: MMPT, key: string, parentNameFilter: Maybe<BareNameFilter>): Promise<PrivateTree>;
    static fromBaseKey(mmpt: MMPT, key: string): Promise<PrivateTree>;
    static fromBareNameFilter(mmpt: MMPT, bareNameFilter: BareNameFilter, key: string): Promise<PrivateTree>;
    static fromLatestName(mmpt: MMPT, name: PrivateName, key: string): Promise<PrivateTree>;
    static fromName(mmpt: MMPT, name: PrivateName, key: string): Promise<PrivateTree>;
    static fromInfo(mmpt: MMPT, key: string, info: Maybe<DecryptedNode>): Promise<PrivateTree>;
    createChildTree(name: string, onUpdate: Maybe<UpdateCallback>): Promise<PrivateTree>;
    createOrUpdateChildFile(content: FileContent, name: string, onUpdate: Maybe<UpdateCallback>): Promise<PrivateFile>;
    putDetailed(): Promise<PrivateAddResult>;
    updateDirectChild(child: PrivateTree | PrivateFile, name: string, onUpdate: Maybe<UpdateCallback>): Promise<this>;
    removeDirectChild(name: string): this;
    getDirectChild(name: string): Promise<PrivateTree | PrivateFile | null>;
    getName(): Promise<PrivateName>;
    updateParentNameFilter(parentNameFilter: BareNameFilter): Promise<this>;
    get(path: Path): Promise<PrivateTree | PrivateFile | null>;
    getRecurse(nodeInfo: PrivateSkeletonInfo | SoftLink, parts: string[]): Promise<PrivateTree | PrivateFile | null>;
    assignLink({ name, link, skeleton }: {
        name: string;
        link: PrivateLink | SoftLink;
        skeleton: PrivateSkeletonInfo | SoftLink;
    }): void;
    static resolveSoftLink(link: SoftLink): Promise<PrivateTree | PrivateFile | null>;
    getLinks(): Links;
    updateLink(name: string, result: PrivateAddResult): this;
    insertSoftLink({ name, username, key, privateName }: {
        name: string;
        username: string;
        key: string;
        privateName: PrivateName;
    }): this;
}
export {};
