/**
 * useContextVisualization Hook - Semantic relationship and context visualization
 * Features: Topic clustering, semantic mapping, conversation flow analysis
 */
import type { Message } from '../components/ai-native/AIConversationCanvas';
export interface TopicCluster {
    id: string;
    name: string;
    weight: number;
    keywords: string[];
    messages: string[];
    relationships: Array<{
        targetId: string;
        strength: number;
        type: 'semantic' | 'temporal' | 'causal';
    }>;
    centroid: {
        x: number;
        y: number;
    };
    color: string;
}
export interface SemanticNode {
    id: string;
    text: string;
    messageId: string;
    embeddings: number[];
    position: {
        x: number;
        y: number;
        z?: number;
    };
    connections: Array<{
        nodeId: string;
        similarity: number;
        type: 'semantic' | 'causal' | 'temporal';
    }>;
    importance: number;
    category: string;
}
export interface ContextGraph {
    nodes: SemanticNode[];
    edges: Array<{
        source: string;
        target: string;
        weight: number;
        type: 'question-answer' | 'follow-up' | 'clarification' | 'topic-shift';
        metadata?: Record<string, any>;
    }>;
    clusters: TopicCluster[];
    timeline: Array<{
        timestamp: Date;
        event: 'topic-start' | 'topic-end' | 'context-shift' | 'user-intent-change';
        metadata: Record<string, any>;
    }>;
}
export interface UseContextVisualizationOptions {
    enabled?: boolean;
    messages: Message[];
    maxClusters?: number;
    clusteringAlgorithm?: 'kmeans' | 'hierarchical' | 'dbscan';
    semanticSimilarityThreshold?: number;
    updateInterval?: number;
    enableRealTimeUpdates?: boolean;
    visualizationMode?: '2d' | '3d' | 'force-directed' | 'hierarchical';
    onTopicDetected?: (topic: TopicCluster) => void;
    onContextShift?: (shift: {
        from: string;
        to: string;
        confidence: number;
    }) => void;
}
export interface UseContextVisualizationReturn {
    contextGraph: ContextGraph | null;
    topicClusters: TopicCluster[];
    semanticMap: SemanticNode[];
    isAnalyzing: boolean;
    analysisProgress: number;
    currentTopic: TopicCluster | null;
    contextFlow: Array<{
        messageId: string;
        topicId: string;
        transitionType: 'continuation' | 'shift' | 'return';
        confidence: number;
    }>;
    updateContext: (messages: Message[]) => Promise<void>;
    analyzeSemanticSimilarity: (text1: string, text2: string) => Promise<number>;
    extractTopics: (messages: Message[]) => Promise<TopicCluster[]>;
    generateContextSummary: () => string;
    exportVisualization: (format: 'json' | 'svg' | 'png') => Promise<string | Blob>;
    resetVisualization: () => void;
}
export declare const useContextVisualization: ({ enabled, messages, maxClusters, clusteringAlgorithm, semanticSimilarityThreshold, updateInterval, enableRealTimeUpdates, visualizationMode, onTopicDetected, onContextShift }: UseContextVisualizationOptions) => UseContextVisualizationReturn;
export default useContextVisualization;
//# sourceMappingURL=useContextVisualization.d.ts.map