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' | any;
    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-18
 */
declare class GraphBuilder {
    rootDir: string;
    private nodesMap;
    private edges;
    private edgesSet;
    constructor(rootDir?: string);
    private normalizeLabel;
    private extractReferencedPaths;
    private getPackageGroup;
    /**
     * Add a new node to the graph or update an existing one.
     *
     * @param file - Unique identifier for the file (node ID).
     * @param title - Optional title or description for the node.
     * @param value - Numerical value representing the node size/weight.
     */
    addNode(file: string, title?: string, value?: number): void;
    /**
     * Add a directed edge between two nodes in the graph.
     *
     * @param from - Source node ID (file path).
     * @param to - Target node ID (file path).
     * @param type - Type of relationship (e.g., 'dependency', 'reference').
     */
    addEdge(from: string, to: string, type?: string): void;
    /**
     * Build the final GraphData object from collected nodes and edges.
     *
     * @returns Consolidated graph data structure.
     */
    build(): GraphData;
    /**
     * Static helper to build graph from an AIReady report JSON.
     *
     * @param report - Unified AIReady report object.
     * @param rootDir - Root directory for path resolution.
     * @returns Fully populated GraphData for visualization.
     */
    static buildFromReport(report: any, rootDir?: string): GraphData;
}
/**
 * Create a small sample graph for demonstration or testing purposes.
 *
 * @returns Simple sample GraphData object.
 * @lastUpdated 2026-03-18
 */
declare function createSampleGraph(): GraphData;

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