export type SimpleTreeOptions<T> = {
    idAccessor?: string | ((d: T) => string);
    childrenAccessor?: string | ((d: T) => readonly T[] | null | undefined);
};
type Accessors<T> = {
    getId: (data: T) => string;
    getChildren: (data: T) => readonly T[] | null | undefined;
    childrenKey: string;
};
export declare class SimpleTree<T> {
    root: SimpleNode<T>;
    private accessors;
    constructor(data: T[], options?: SimpleTreeOptions<T>);
    get data(): T[];
    create(args: {
        parentId: string | null;
        index: number;
        data: T;
    }): null | undefined;
    move(args: {
        id: string;
        parentId: string | null;
        index: number;
    }): void;
    update(args: {
        id: string;
        changes: Partial<T>;
    }): void;
    drop(args: {
        id: string;
    }): void;
    find(id: string, node?: SimpleNode<T>): SimpleNode<T> | null;
}
declare class SimpleNode<T> {
    data: T;
    parent: SimpleNode<T> | null;
    private accessors;
    id: string;
    children?: SimpleNode<T>[];
    constructor(data: T, parent: SimpleNode<T> | null, accessors: Accessors<T>, id?: string);
    hasParent(): this is this & {
        parent: SimpleNode<T>;
    };
    get childIndex(): number;
    addChild(data: T, index: number): void;
    removeChild(index: number): void;
    update(changes: Partial<T>): void;
    drop(): void;
}
export {};
