// types/neo4j.types.ts

export interface Neo4jNode {
  id: string;
  labels: string[];
  properties: Record<string, any>;
}

export interface Neo4jRelationship {
  id: string;
  type: string;
  startNodeId: string;
  endNodeId: string;
  properties: Record<string, any>;
}

export interface Neo4jGraphData {
  nodes: Neo4jNode[];
  relationships: Neo4jRelationship[];
}

// D3 force simulation types
export interface D3Node extends Neo4jNode {
  x?: number;
  y?: number;
  fx?: number | null;
  fy?: number | null;
  vx?: number;
  vy?: number;
}

export interface D3Link extends Neo4jRelationship {
  source: D3Node | string;
  target: D3Node | string;
}

export interface GraphVisualizerProps {
  graphData?: Neo4jGraphData;
  onNodeClick?: (node: Neo4jNode) => void;
  onRelationshipClick?: (relationship: Neo4jRelationship) => void;
  onNodeDoubleClick?: (node: Neo4jNode) => void;
}

export interface GraphConfig {
  width: number;
  height: number;
  nodeRadius: number;
  linkDistance: number;
  chargeStrength: number;
  collisionRadius: number;
}