import type { EditItem, OccurrenceSpec, EditResult, EditResultStatus } from './types.js';
type EditComputationResult = {
    newContent: string;
    occurrencesReplaced: number;
    warning?: string | undefined;
} | {
    error: string;
};
export declare function decodeBase64(value: string): string;
export declare function normalizeWhitespace(s: string): string;
export declare function escapeRegex(s: string): string;
export declare function findFuzzyLineMatch(content: string, findStr: string): {
    start: number;
    end: number;
    similarity: number;
    candidateLines: string[];
} | null;
export declare function findAllPositions(content: string, find: string, mode: 'exact' | 'fuzzy' | 'regex', caseSensitive: boolean, whitespaceSensitive?: boolean, multiline?: boolean): {
    start: number;
    end: number;
}[];
export declare function applyHints(content: string, positions: {
    start: number;
    end: number;
}[], hints: EditItem['hints'], nearLine?: number): {
    positions: {
        start: number;
        end: number;
    }[];
    warning?: string | undefined;
};
export declare function selectOccurrences(positions: {
    start: number;
    end: number;
}[], occurrence: OccurrenceSpec | undefined): {
    selected: {
        start: number;
        end: number;
    }[];
} | {
    error: string;
    hint?: string;
};
export declare function applyReplacements(content: string, selections: {
    start: number;
    end: number;
}[], find: string, replace: string, mode: 'exact' | 'fuzzy' | 'regex', caseSensitive: boolean): string;
export declare function computeExactEdit(fileContent: string, item: EditItem): {
    newContent: string;
    occurrencesReplaced: number;
} | {
    error: string;
};
export declare function computeAstEdit(fileContent: string, item: EditItem, filePath: string): Promise<EditComputationResult>;
export declare function computeAstPatternEdit(fileContent: string, item: EditItem, filePath: string): Promise<EditComputationResult>;
export declare function classifyEditFailure(message: string): EditResultStatus;
export declare function buildFailedEditResult(item: EditItem, error: string, status: EditResultStatus): EditResult;
export declare function computeSingleEdit(fileContent: string, item: EditItem, mode: 'exact' | 'fuzzy' | 'regex', caseSensitive: boolean, whitespaceSensitive?: boolean, multiline?: boolean): {
    newContent: string;
    occurrencesReplaced: number;
    warning?: string | undefined;
} | {
    error: string;
    hint?: string | undefined;
};
export {};
//# sourceMappingURL=match.d.ts.map