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

/**
 * Severity levels for issues
 */
type IssueSeverity = Severity;
/**
 * Base graph node (compatible with d3-force SimulationNodeDatum)
 */
interface BaseGraphNode {
    id: string;
    x?: number;
    y?: number;
    vx?: number;
    vy?: number;
    fx?: number | null;
    fy?: number | null;
}
/**
 * Base graph link (compatible with d3-force SimulationLinkDatum)
 */
interface BaseGraphLink {
    source: string | BaseGraphNode;
    target: string | BaseGraphNode;
    index?: number;
}
/**
 * File node in the dependency graph
 */
interface FileNode extends BaseGraphNode, 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;
}
/**
 * Issue overlay on the graph
 */
interface IssueOverlay {
    id: string;
    type: string;
    severity: Severity;
    nodeIds: string[];
    edgeIds?: string[];
    message: string;
    details?: string;
}
/**
 * Complete graph data structure
 */
interface GraphData extends GraphData$1 {
    nodes: FileNode[];
    edges: DependencyEdge[];
    clusters: Cluster[];
    issues: IssueOverlay[];
    metadata: GraphMetadata;
}
/**
 * Metadata about the graph
 */
interface GraphMetadata extends GraphMetadata$1 {
    projectName?: string;
    timestamp: string;
    totalFiles: number;
    totalDependencies: number;
    analysisTypes: string[];
    totalLinesOfCode?: number;
    totalTokenCost?: number;
    averageComplexity?: number;
    criticalIssues: number;
    majorIssues: number;
    minorIssues: number;
    infoIssues: number;
    estimatedMonthlyCost?: number;
    estimatedDeveloperHours?: number;
    aiAcceptanceRate?: number;
    aiReadinessScore?: number;
    /** AI token budget unit economics (v0.13+) */
    tokenBudget?: TokenBudget;
    /** Truncation info (v0.12+) */
    truncated?: {
        nodes: boolean;
        edges: boolean;
        nodeCount?: number;
        edgeCount?: number;
        nodeLimit?: number;
        edgeLimit?: number;
    };
}
/**
 * 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
 */
declare class GraphBuilder {
    rootDir: string;
    private nodesMap;
    private edges;
    private edgesSet;
    constructor(rootDir?: string);
    private normalizeLabel;
    private extractReferencedPaths;
    private getPackageGroup;
    addNode(file: string, title?: string, value?: number): void;
    addEdge(from: string, to: string, type?: string): void;
    /**
     * Build final GraphData
     */
    build(): GraphData;
    /**
     * Static helper to build graph from an aiready report JSON (ports logic from tools/generate_from_report.cjs)
     */
    static buildFromReport(report: any, rootDir?: string): GraphData;
}
declare function createSampleGraph(): GraphData;

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