import type { Token } from 'antlr4';
import type { IQueryContext, IQueryPair } from '../types/antlrQueryTypes';
export declare function createContext(token: Token, isInKey: boolean, isInNegation: boolean, isInOperator: boolean, isInValue: boolean, keyToken?: string, operatorToken?: string, valueToken?: string, queryPairs?: IQueryPair[], currentPair?: IQueryPair | null): IQueryContext;
export declare function getCurrentValueIndexAtCursor(valuesPosition: {
    start?: number;
    end?: number;
}[], cursorIndex: number): number | null;
/**
 * Gets the current query context at the cursor position
 * This is useful for determining what kind of suggestions to show
 *
 * The function now includes full query pair information:
 * - queryPairs: All key-operator-value triplets in the query
 * - currentPair: The pair at or before the current cursor position
 *
 * This enables more intelligent context-aware suggestions based on
 * the current key, operator, and surrounding query structure.
 *
 * @param query The query string
 * @param cursorIndex The position of the cursor in the query
 * @returns The query context at the cursor position
 */
export declare function getQueryContextAtCursor(query: string, cursorIndex: number): IQueryContext;
/**
 * Extracts all key-operator-value triplets from a query string
 * This is useful for getting value suggestions based on the current key and operator
 *
 * @param query The query string to parse
 * @returns An array of IQueryPair objects representing the key-operator-value triplets
 */
export declare function extractQueryPairs(query: string): IQueryPair[];
/**
 * Gets the current query pair at the cursor position
 * This is useful for getting suggestions based on the current context
 * The function finds the rightmost complete pair that ends before or at the cursor position
 *
 * @param queryPairs An array of IQueryPair objects representing the key-operator-value triplets
 * @param query The full query string
 * @param cursorIndex The position of the cursor in the query
 * @returns The query pair at the cursor position, or null if not found
 */
export declare function getCurrentQueryPair(queryPairs: IQueryPair[], query: string, cursorIndex: number): IQueryPair | null;
/**
 * Usage example for query context with pairs:
 *
 * ```typescript
 * // Get context at cursor position
 * const context = getQueryContextAtCursor(query, cursorPosition);
 *
 * // Access all query pairs
 * const allPairs = context.queryPairs || [];
 * console.log(`Query contains ${allPairs.length} key-operator-value triplets`);
 *
 * // Access the current pair at cursor
 * if (context.currentPair) {
 *   // Use the current triplet to provide relevant suggestions
 *   const { key, operator, value } = context.currentPair;
 *   console.log(`Current context: ${key} ${operator} ${value || ''}`);
 *
 *   // Check if this is a complete triplet
 *   if (context.currentPair.isComplete) {
 *     // All parts (key, operator, value) are present
 *   } else {
 *     // Incomplete - might be missing operator or value
 *   }
 * } else {
 *   // No current pair, likely at the start of a new condition
 * }
 * ```
 */
