import { ParticlePool } from "./ParticlePool";
import type { ActiveTransition } from "./pipelineTransitionUtils";
import type { NetworkPipelineConfig, NetworkSceneNode, NetworkSceneEdge, NetworkLabel, RealtimeNode, RealtimeEdge, EdgePush } from "./networkTypes";
import type { Datum } from "../charts/shared/datumTypes";
/**
 * NetworkPipelineStore — stateful store for the StreamNetworkFrame.
 *
 * Absorbs TopologyStore's functionality (mutable Maps, tension tracking,
 * bezier caching) and adds layout plugin dispatch and scene graph generation.
 *
 * For bounded data: ingests nodes/edges arrays, runs layout once, builds scene.
 * For streaming data: ingests edge pushes, tracks tension, relayouts on threshold.
 */
export declare class NetworkPipelineStore {
    nodes: Map<string, RealtimeNode>;
    edges: Map<string, RealtimeEdge>;
    tension: number;
    layoutVersion: number;
    sceneNodes: NetworkSceneNode[];
    sceneEdges: NetworkSceneEdge[];
    labels: NetworkLabel[];
    particlePool: ParticlePool | null;
    private config;
    private tensionConfig;
    transition: ActiveTransition | null;
    private _hasRenderedOnce;
    /** Snapshot of node positions from before bounded re-ingestion cleared the maps */
    private _boundedPrevSnapshot;
    /** Snapshot of edge positions from before bounded re-ingestion cleared the maps */
    private _boundedEdgeSnapshot;
    lastIngestTime: number;
    private nodeTimestamps;
    private edgeTimestamps;
    /** Cached sorted node-timestamp entries for applyDecay(); null = needs rebuild */
    private _decaySortedNodes;
    /** Node IDs added in the most recent layout */
    addedNodes: Set<string>;
    /** Node IDs removed in the most recent layout */
    removedNodes: Set<string>;
    /** Edge keys added in the most recent layout */
    addedEdges: Set<string>;
    /** Edge keys removed in the most recent layout */
    removedEdges: Set<string>;
    /** Timestamp of last topology change */
    lastTopologyChangeTime: number;
    private previousNodeIds;
    private previousEdgeKeys;
    /** Snapshot of node positions from the last layout — used for force warm-start */
    _lastPositionSnapshot: Map<string, {
        x: number;
        y: number;
    }> | null;
    constructor(config: NetworkPipelineConfig);
    updateConfig(config: NetworkPipelineConfig): void;
    /**
     * Ingest hierarchy root data for tree/treemap/circlepack/partition layouts.
     * The hierarchy root is passed to the layout plugin via config.__hierarchyRoot.
     */
    ingestHierarchy(rootData: any, size: [number, number]): void;
    /**
     * Ingest bounded node/edge arrays (from props).
     * Clears existing topology and rebuilds from scratch.
     */
    ingestBounded(rawNodes: any[], rawEdges: any[], size: [number, number]): void;
    /**
     * Unique key for an edge (same as TopologyStore).
     */
    private edgeKey;
    /**
     * Ingest a pushed edge. Creates nodes/edges as needed and accumulates tension.
     * Returns true if a relayout is needed.
     */
    ingestEdge(push: EdgePush): boolean;
    /**
     * Run the layout algorithm via the appropriate plugin.
     */
    runLayout(size: [number, number]): void;
    /**
     * Build the scene graph from current layout positions.
     */
    buildScene(size: [number, number]): void;
    /** Whether the current layout plugin drives continuous animation (respects orbitAnimated config) */
    get isAnimating(): boolean;
    /**
     * Advance the layout animation by one frame (e.g. orbit rotation).
     * Returns true if the scene should be rebuilt.
     */
    tickAnimation(size: [number, number], deltaTime: number): boolean;
    /**
     * Advance the transition animation. Returns true if still animating.
     */
    advanceTransition(now: number): boolean;
    private prepareForRelayout;
    private finalizeLayout;
    private saveTargetPositions;
    private restorePreviousPositions;
    private snapToTargets;
    private updateEdgeBezier;
    private buildStandardBezier;
    private buildCircularBezier;
    rebuildAllBeziers(): void;
    /**
     * Apply pulse glow to scene nodes/edges based on their creation timestamps.
     */
    applyPulse(now: number): void;
    /**
     * Apply decay opacity to scene nodes based on topology age order.
     * Older nodes (created earlier) are more faded.
     */
    applyDecay(): void;
    /**
     * Apply topology diff highlight — newly added nodes glow briefly.
     * Duration: 2 seconds from lastTopologyChangeTime.
     */
    applyTopologyDiff(now: number): void;
    /** Whether there is an active topology diff animation */
    get hasActiveTopologyDiff(): boolean;
    /**
     * Apply threshold alerting to scene nodes.
     * Overrides fill color and adds pulse for nodes exceeding thresholds.
     */
    applyThresholds(now: number): void;
    /**
     * Whether there are active threshold alerts on any node.
     */
    get hasActiveThresholds(): boolean;
    /**
     * Whether there are active pulse animations (recent ingests within pulse duration).
     */
    get hasActivePulses(): boolean;
    getLayoutData(): {
        nodes: RealtimeNode[];
        edges: RealtimeEdge[];
    };
    /**
     * Update a node's data by ID. Returns the previous data, or null if not found.
     */
    updateNode(id: string, updater: (data: Datum) => Datum): Datum | null;
    /**
     * Update all edges between source and target. Handles parallel edges.
     * Returns array of previous data values (one per updated edge), or empty array.
     */
    updateEdge(sourceId: string, targetId: string, updater: (data: Datum) => Datum): Datum[];
    /**
     * Remove a node by ID. Also removes all edges connected to this node.
     * Returns true if the node was found and removed.
     */
    removeNode(id: string): boolean;
    /**
     * Remove all edges between source and target node IDs.
     * Handles parallel edges (multiple edges between the same pair).
     * Returns true if at least one edge was removed.
     */
    /**
     * Remove edges by source+target IDs, or by edge ID when edgeIdAccessor is configured.
     *
     * - `removeEdge(sourceId, targetId)` — removes all parallel edges between endpoints
     * - `removeEdge(edgeId)` — removes the edge matching edgeIdAccessor (requires config.edgeIdAccessor)
     */
    removeEdge(sourceIdOrEdgeId: string, targetId?: string): boolean;
    clear(): void;
}
