import { CharChainResult, CharNode, ChainOperationContextStep, OperationType } from "../models";
import { Logger } from "../core/logger";
/**
 * Service for building operation summaries.
 * Provides helper functions to extract and format operation data.
 */
export declare class OperationSummaryService {
    private _logger;
    private _data;
    constructor(logger: Logger);
    /**
     * Update the data reference.
     */
    setData(data: CharChainResult | null): void;
    /**
     * Get operation by version tag.
     * @param versionTag - Version tag (e.g., "v1", "v2")
     * @returns The step containing the operation, or null
     */
    getStepByVersionTag(versionTag: string): ChainOperationContextStep | null;
    /**
     * Get operation by ID.
     * @param operationId - Operation ID
     * @returns The step containing the operation, or null
     */
    getStepByOperationId(operationId: string): ChainOperationContextStep | null;
    /**
     * Get text from a node ID by searching in version tagged nodes.
     * @param nodeId - Node ID
     * @param versionTag - Version tag to search in (searches backwards if not found)
     * @returns The node's text, or empty string
     */
    getNodeText(nodeId: number, versionTag: string): string;
    /**
     * Get a node by ID, searching in version tagged nodes.
     *
     * Searches backwards from the specified version to v0. Since v0 is normalized
     * and added to taggedNodes by the component during data processing, no special
     * handling is needed.
     *
     * @param nodeId - Node ID
     * @param versionTag - Version tag to search in (searches backwards if not found)
     * @returns The node, or null
     */
    getNode(nodeId: number, versionTag: string): CharNode | null;
    /**
     * Get text from a span of nodes.
     * @param nodeIds - Array of node IDs
     * @param versionTag - Version tag
     * @returns Concatenated text
     */
    getSpanText(nodeIds: number[], versionTag: string): string;
    /**
     * Get context text around a node or span, including the affected text.
     * Extends context to word boundaries (space or LF) after collecting minimum characters.
     * @param nodeIds - Node IDs of the target span (used when atAsIndex is false)
     * @param versionTag - Version tag
     * @param atValue - The 'at' value from the operation (node ID or index depending on atAsIndex)
     * @param atAsIndex - Whether 'at' is an index (true) or node ID (false)
     * @param contextSize - Minimum number of characters before/after (default: 20)
     * @returns Context text including the affected span
     */
    getContext(nodeIds: number[], versionTag: string, atValue?: number, atAsIndex?: boolean, contextSize?: number): string;
    /**
     * Get the operation type as a readable string.
     */
    getOperationTypeName(type: OperationType): string;
    /**
     * Get version index from version tag.
     */
    private getVersionIndex;
    /**
     * Escape HTML special characters.
     */
    escapeHtml(text: string): string;
}
