/**
 * Map Expression Detection
 *
 * Phase 7: Detects .map() expressions and extracts loop context information
 *
 * This module analyzes expression code to detect map expressions like:
 * - todoItems.map(todo => ...)
 * - notifications.map((n, index) => ...)
 *
 * It extracts:
 * - The array source (todoItems, notifications)
 * - Loop variable names (todo, n, index)
 * - The map body/template
 */
import type { ExpressionIR } from '../ir/types';
/**
 * Detected map expression information
 */
export interface MapExpressionInfo {
    isMap: boolean;
    arraySource?: string;
    itemVariable?: string;
    indexVariable?: string;
    mapBody?: string;
    fullExpression?: string;
}
/**
 * Detect if an expression is a map expression and extract loop context
 *
 * Patterns detected:
 * - arraySource.map(item => body)
 * - arraySource.map((item, index) => body)
 * - arraySource.map(item => (body))
 */
export declare function detectMapExpression(expr: ExpressionIR): MapExpressionInfo;
/**
 * Extract loop variables from a map expression
 * Returns array of variable names in order: [itemVariable, indexVariable?]
 */
export declare function extractLoopVariables(mapInfo: MapExpressionInfo): string[];
/**
 * Check if an expression references a loop variable
 * Used to determine if an expression needs loop context
 */
export declare function referencesLoopVariable(exprCode: string, loopVars: string[]): boolean;
