// 圈选元素
import { GraphDataNode, GraphDataLink } from '../common';

declare namespace Selector {
  /**
   * @function graphSelector
   * @description 图谱选择器
   */
  interface graphSelector {
    (
      nodeSelector: GraphDataNode | ((d: GraphDataNode) => boolean),
      linkSelector: GraphDataLink | ((GraphDataLink) => boolean | 'source' | 'target' | 'all')
    ): void;
  }

  /**
   * @function findLinkedRoute
   * @description 查到关联节点
   */
  interface findLinkedRoute {
    (
      d: GraphDataNode,
      type: 'source' | 'target',
      deepCnt: number,
      nodeArr: GraphDataNode[],
      linkArr: GraphDataLink[]
    ): void;
  }
}

export default Selector;
