import { GraphEdge, GraphNode, Severity, GraphData as GraphData$1, IssueOverlay, GraphMetadata } from '@aiready/core';

/**
 * Severity levels for issues
 */
type IssueSeverity = Severity;
/**
 * File node in the dependency graph
 */
interface FileNode extends GraphNode {
    id: string;
    path: string;
    label: string;
    linesOfCode?: number;
    tokenCost?: number;
    complexity?: number;
    duplicates?: number;
    inconsistencies?: number;
    domain?: string;
    moduleType?: 'component' | 'util' | 'service' | 'config' | 'test' | 'other';
    color?: string;
    size?: number;
    group?: string;
}
/**
 * Dependency edge between files
 */
interface DependencyEdge extends GraphEdge {
    source: string;
    target: string;
    type?: 'import' | 'require' | 'dynamic' | 'dependency' | 'reference' | 'similarity' | 'related' | string;
    weight?: number;
    color?: string;
    width?: number;
    label?: string;
}
/**
 * Domain or module cluster
 */
interface Cluster {
    id: string;
    name: string;
    nodeIds: string[];
    color?: string;
    description?: string;
}
/**
 * Complete graph data structure
 */
interface GraphData extends GraphData$1 {
    nodes: FileNode[];
    edges: DependencyEdge[];
    clusters: Cluster[];
    issues: IssueOverlay[];
    metadata: GraphMetadata;
}
/**
 * Filter options for the visualization
 */
interface FilterOptions {
    severities?: IssueSeverity[];
    issueTypes?: string[];
    domains?: string[];
    moduleTypes?: FileNode['moduleType'][];
    minTokenCost?: number;
    maxTokenCost?: number;
    showOnlyIssues?: boolean;
}
/**
 * Layout configuration
 */
interface LayoutConfig {
    type: 'force' | 'hierarchical' | 'circular' | 'radial';
    chargeStrength?: number;
    linkDistance?: number;
    collisionRadius?: number;
}
/**
 * Visualization configuration
 */
interface VisualizationConfig {
    layout: LayoutConfig;
    filters: FilterOptions;
    colorBy: 'severity' | 'domain' | 'moduleType' | 'tokenCost';
    sizeBy: 'tokenCost' | 'loc' | 'complexity' | 'duplicates';
    showLabels: boolean;
    showClusters: boolean;
}

/**
 * Graph builder - transforms AIReady analysis results into graph data
 */

/**
 * GraphBuilder: programmatic builder and report-based builder.
 * @lastUpdated 2026-03-31
 */
declare class GraphBuilder {
    private readonly rootDir;
    private readonly nodesMap;
    private readonly edges;
    private readonly edgesSet;
    constructor(rootDir?: string);
    getRootDir(): string;
    hasEdge(key: string): boolean;
    getNode(id: string): FileNode | undefined;
    /**
     * Add a new node to the graph or update an existing one.
     */
    addNode(file: string, title?: string, size?: number): void;
    /**
     * Add a directed edge between two nodes in the graph.
     */
    addEdge(from: string, to: string, type?: string): void;
    /**
     * Build the final GraphData object from collected nodes and edges.
     */
    build(): GraphData;
    /**
     * Static helper to build graph from an AIReady report JSON.
     */
    static buildFromReport(report: any, rootDir?: string): GraphData;
}
/**
 * Create a small sample graph for demonstration or testing purposes.
 */
declare function createSampleGraph(): GraphData;

export { type Cluster, type DependencyEdge, type FileNode, type FilterOptions, GraphBuilder, type GraphData, type IssueSeverity, type LayoutConfig, type VisualizationConfig, createSampleGraph };
