import type { LinkItem } from '../customLink';
import type { Summary } from '../summary';
import type { NodeObj } from '../types/index';
type NodeOperation = {
    name: 'moveNode' | 'moveDownNode' | 'moveUpNode' | 'copyNode' | 'addChild' | 'insertParent' | 'insertBefore' | 'insertSibling' | 'beginEdit';
    obj: NodeObj;
} | {
    name: 'reshapeNode';
    obj: NodeObj;
    origin: NodeObj;
} | {
    name: 'finishEdit';
    obj: NodeObj;
    origin: string;
} | {
    name: 'moveNodeAfter' | 'moveNodeBefore' | 'moveNode';
    obj: NodeObj;
    toObj: NodeObj;
    originParentId?: string;
} | {
    name: 'removeNode';
    obj: NodeObj;
    originIndex?: number;
    originParentId?: string;
} | {
    name: 'removeNodes';
    objs: NodeObj[];
};
export type SummaryOperation = {
    name: 'createSummary';
    obj: Summary;
} | {
    name: 'removeSummary';
    obj: {
        id: string;
    };
} | {
    name: 'finishEditSummary';
    obj: Summary;
};
export type CustomLinkOperation = {
    name: 'createCustomLink';
    obj: LinkItem;
} | {
    name: 'removeCustomLink';
    obj: {
        id: string;
    };
} | {
    name: 'finishEditCustomLinkLabel';
    obj: LinkItem;
};
export type Operation = NodeOperation | SummaryOperation | CustomLinkOperation;
export type OperationType = Operation['name'];
export type EventMap = {
    operation: (info: Operation) => void;
    selectNode: (nodeObj: NodeObj, e?: MouseEvent) => void;
    selectNewNode: (nodeObj: NodeObj) => void;
    selectNodes: (nodeObj: NodeObj[]) => void;
    unselectNode: () => void;
    unselectNodes: () => void;
    expandNode: (nodeObj: NodeObj) => void;
};
declare const Bus: {
    create<T extends Record<string, (...args: any[]) => void> = EventMap>(): {
        handlers: Record<keyof T, ((...arg: any[]) => void)[]>;
        showHandler: () => void;
        addListener: <K extends keyof T>(type: K, handler: T[K]) => void;
        fire: <K_1 extends keyof T>(type: K_1, ...payload: Parameters<T[K_1]>) => void;
        removeListener: <K_2 extends keyof T>(type: K_2, handler: T[K_2]) => void;
    };
};
export default Bus;
