import type { TraceNode } from '@/types/trace'
import type { TimelineItem } from '@/types/timeline'

export interface CytoscapeTooltipSource {
  label?: string
  start?: string | Date
  end?: string | Date
  timestamp?: string | Date
}

export interface NodeTooltipData {
  name: string
  start?: string | Date
  end?: string | Date
  timestamp?: string | Date
}

export interface NodeTooltipInfo extends NodeTooltipData {
  x: number
  y: number
}

export interface NodeHoverPayload<T> {
  item: T
  clientX: number
  clientY: number
}

export type TraceNodeHoverPayload = NodeHoverPayload<TraceNode>
export type TimelineNodeHoverPayload = NodeHoverPayload<TimelineItem>
