import { SqlComponent } from '../models/SqlComponent';
/**
 * Utility class for editing comments on SQL components.
 * Provides functions to add, edit, delete, and search comments in SQL AST.
 */
export declare class CommentEditor {
    /**
     * Add a comment to a SQL component using positioned comments system
     * For SelectQuery components, adds to headerComments for query-level comments
     * For other components, adds as 'before' positioned comment
     * @param component The SQL component to add comment to
     * @param comment The comment text to add
     * @param position Optional position for comment ('before' | 'after'), defaults to 'before'
     */
    static addComment(component: SqlComponent, comment: string, position?: 'before' | 'after'): void;
    /**
     * Check if a component implements SelectQuery interface
     * Uses discriminator property for robust type detection
     * @param component The component to check
     * @returns true if the component is a SelectQuery
     */
    private static isSelectQuery;
    /**
     * Edit an existing comment by index
     * For SelectQuery components, edits headerComments
     * For other components, edits positioned comments
     * @param component The SQL component containing the comment
     * @param index The index of the comment to edit (0-based)
     * @param newComment The new comment text
     * @param position Position to edit ('before' | 'after'), defaults to 'before' for non-SelectQuery components
     * @throws Error if index is invalid
     */
    static editComment(component: SqlComponent, index: number, newComment: string, position?: 'before' | 'after'): void;
    /**
     * Delete a comment by index
     * For SelectQuery components, deletes from headerComments
     * For other components, deletes from positioned comments
     * @param component The SQL component containing the comment
     * @param index The index of the comment to delete (0-based)
     * @param position Position to delete from ('before' | 'after'), defaults to 'before' for non-SelectQuery components
     * @throws Error if index is invalid
     */
    static deleteComment(component: SqlComponent, index: number, position?: 'before' | 'after'): void;
    /**
     * Delete all comments from a component
     * @param component The SQL component to clear comments from
     */
    static deleteAllComments(component: SqlComponent): void;
    /**
     * Get all comments from a component
     * For SelectQuery components, returns headerComments
     * For other components, returns all positioned comments as a flat array
     * @param component The SQL component to get comments from
     * @returns Array of comment strings (empty array if no comments)
     */
    static getComments(component: SqlComponent): string[];
    /**
     * Find all components in the AST that have comments containing the search text
     * @param root The root SQL component to search from
     * @param searchText The text to search for in comments
     * @param caseSensitive Whether the search should be case-sensitive (default: false)
     * @returns Array of components that have matching comments
     */
    static findComponentsWithComment(root: SqlComponent, searchText: string, caseSensitive?: boolean): SqlComponent[];
    /**
     * Replace all occurrences of a text in comments across the entire AST
     * @param root The root SQL component to search and replace in
     * @param searchText The text to search for
     * @param replaceText The text to replace with
     * @param caseSensitive Whether the search should be case-sensitive (default: false)
     * @returns Number of replacements made
     */
    static replaceInComments(root: SqlComponent, searchText: string, replaceText: string, caseSensitive?: boolean): number;
    /**
     * Count total number of comments in the AST
     * @param root The root SQL component to count comments in
     * @returns Total number of comments
     */
    static countComments(root: SqlComponent): number;
    /**
     * Get all comments from the entire AST as a flat array with their source components
     * @param root The root SQL component to extract comments from
     * @returns Array of objects containing comment text and the component they belong to
     */
    static getAllComments(root: SqlComponent): {
        comment: string;
        component: SqlComponent;
        index: number;
    }[];
}
