import { type GrepEngineMatch, type GrepEngineRequest } from "../engine.ts";
import type { Candidate } from "./enumerate.ts";
interface RgText {
    text?: string;
    bytes?: string;
}
export interface RgEvent {
    type: "begin" | "match" | "context" | "end" | "summary";
    data: {
        path?: RgText;
        lines?: RgText;
        line_number?: number;
        submatches?: Array<{
            start: number;
        }>;
        binary_offset?: number | null;
    };
}
export interface FileRows {
    candidate: Candidate;
    rows: Map<number, GrepEngineMatch>;
}
export declare function parseRgEvent(line: string): RgEvent;
export declare function collectSegmentRows(segment: Candidate[], request: GrepEngineRequest, oversized: boolean): {
    files: Map<string, FileRows>;
    segmentBinary: Set<string>;
    onEvent: (event: RgEvent) => void;
};
export {};
//# sourceMappingURL=json-rows.d.ts.map