import type { NodeSchema } from '../../types';
import type { Node } from './node';
import { TRANSFORM_STAGE } from '../../types';
export declare enum NODE_CHILDREN_EVENT {
    CHANGE = "nodeChildren:change",
    INSERT = "nodeChildren:insert"
}
export declare class NodeChildren {
    private emitter;
    readonly owner: Node;
    getNode(): Node<NodeSchema>;
    accessor children: Node[];
    get size(): number;
    get isEmptyNode(): boolean;
    isEmpty(): boolean;
    constructor(owner: Node, data?: NodeSchema[]);
    export(stage?: TRANSFORM_STAGE): NodeSchema[];
    import(data?: NodeSchema | NodeSchema[], checkId?: boolean): void;
    remove(purge?: boolean, useMutator?: boolean): void;
    private purged;
    purge(): void;
    internalInitParent(): void;
    internalUnlinkChild(node: Node): boolean;
    unlinkChild(node: Node): void;
    delete(node: Node): boolean;
    internalDelete(node: Node, purge?: boolean, useMutator?: boolean): boolean;
    get(index: number): Node<NodeSchema> | null;
    has(node: Node): boolean;
    insert(node: Node, at?: number | null): void;
    /**
     * insert a node into the children
     * @param node
     * @param at if at is null or -1, insert the node to the end of the children
     */
    internalInsert(node: Node, at?: number | null, useMutator?: boolean): void;
    mergeChildren(remover: (node: Node, idx: number) => boolean, adder: (children: Node[]) => NodeSchema[] | null, sorter: (firstNode: Node, secondNode: Node) => number): any;
    indexOf(node: Node): number;
    find(f: (value: Node, index: number, obj: Node[]) => unknown): Node<NodeSchema> | undefined;
    forEach(fn: (node: Node, index: number) => void): void;
    reverse(): Node[];
    map(fn: (node: Node, index: number) => Node): Node[];
    every(fn: (node: Node, index: number) => boolean): boolean;
    some(fn: (node: Node, index: number) => boolean): boolean;
    filter(fn: (node: Node, index: number) => boolean): Node[];
    reduce(fn: (acc: any, cur: Node) => any, initialValue: any): any;
    onChange(listener: (info?: {
        type: string;
        node: Node;
    }) => void): () => void;
    onInsert(listener: (node: Node) => void): () => void;
}
