import { LogSeverity } from '../editors/types';
/**
 * LiveLogTail — React wrapper around the vanilla `LogViewer`.
 * @countermeasure-platform/web-components/primitives/live-log-tail
 *
 * Mounts the CodeMirror-backed `LogViewer` inside a container `<div>` and
 * forwards the lifecycle. Imperative `append(line)` and `clear()` are
 * exposed on the ref so SSE consumers can stream lines without rerendering.
 *
 * The `lineParser` prop lets a host map a raw line to
 * `{ className?, text }` for severity coloring; the underlying viewer's
 * built-in severity tokenizer is bypassed when a parser is supplied —
 * the mapped class is set as a `data-cm-line-class` on a wrapper span.
 *
 * `onScrollAway` fires when the user scrolls the viewer away from the
 * bottom (i.e. follow-mode broken), so the host can offer a "jump to
 * latest" affordance.
 */
import * as React from 'react';
export interface LiveLogTailParseResult {
    className?: string;
    text: string;
    severity?: LogSeverity;
}
export interface LiveLogTailProps extends React.HTMLAttributes<HTMLDivElement> {
    /** Initial lines to seed into the buffer. */
    lines?: string[];
    /** Maximum lines retained in the ring buffer. Defaults to 10000. */
    maxLines?: number;
    /** Auto-scroll to the new line on append. Defaults to true. */
    follow?: boolean;
    /** Optional custom parser per line. */
    lineParser?: (line: string) => LiveLogTailParseResult;
    /** Fires when the user scrolls away from the bottom (follow-mode breaks). */
    onScrollAway?: () => void;
}
export interface LiveLogTailHandle {
    append: (line: string) => void;
    clear: () => void;
}
export declare const LiveLogTail: React.ForwardRefExoticComponent<LiveLogTailProps & React.RefAttributes<LiveLogTailHandle>>;
//# sourceMappingURL=live-log-tail.d.ts.map