import type { FileChange } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
import type { RevealTarget } from "../internal/useRevealLine.js";
import type { SelectedWorkspaceFile } from "../internal/store/workspace-file-selection-store.js";
import type { WorkspaceEntry } from "./useWorkspaceEntries.js";
import type { WorkspaceFileReader } from "./WorkspaceFileReader.js";
/** Props for {@link FileViewer}. */
export interface FileViewerProps {
    /** The file to display, keyed by owning entry id + path. */
    readonly selectedFile: SelectedWorkspaceFile;
    /**
     * Live workspace entries. The viewer resolves `selectedFile.entryId` against
     * this list, so a removed entry deselects into a gentle empty state rather
     * than reading a stale value.
     */
    readonly entries: readonly WorkspaceEntry[];
    /**
     * Platform-injected content reader. `undefined` means the host injects no
     * reader — the viewer shows an honest "not available here" state.
     */
    readonly reader: WorkspaceFileReader | undefined;
    /**
     * The session {@link FileChange} that touched this file, when it was changed
     * this session. When present the viewer defaults to the authoritative
     * `baseline→candidate` diff (DD-06) and — for a non-DELETE change with a
     * `reader` — offers a labeled toggle to the live "File" view. `undefined`
     * (the default) keeps the viewer a pure read-only browser (backward
     * compatible). Callers correlate the open file to its change with
     * `findChangeForSelection`; a platform builder can pass any `FileChange`.
     */
    readonly change?: FileChange;
    /**
     * Optional jump-to-line request (e.g. a content-search hit). When present the
     * viewer opens in the live **File** view — a line number refers to current
     * source, not the diff (DR-1) — with the `Diff | File` toggle still available,
     * and the matched line is scrolled into view and highlighted. A new `nonce`
     * re-forces File view and re-scrolls even on an already-open file. No-op when
     * the file is not live-browsable (a DELETE, or no `reader`).
     */
    readonly reveal?: RevealTarget;
    /** Called when the user closes the viewer (close button or Escape). */
    readonly onClose?: () => void;
    /**
     * Whether to render the built-in header (file name, refresh, close). Defaults
     * to `true` for standalone use. Set `false` when an outer chrome owns the file
     * identity and controls — e.g. the workspace surface, whose editor toolbar
     * (and, from Slice B, its tabs) show the name and collapse control, and where
     * a duplicate header would also collide with the floating `headerActions`
     * overlay. `onClose` still drives Escape-to-close even when the header (and
     * its close button) is hidden.
     */
    readonly showHeader?: boolean;
    /** Additional CSS classes for the root element. */
    readonly className?: string;
}
/**
 * Imperative handle for {@link FileViewer}. Lets an outer chrome (e.g. the
 * workspace surface's toolbar, which hides the built-in header) trigger a
 * re-fetch of the live file content without lifting the viewer's fetch state.
 */
export interface FileViewerHandle {
    /** Re-fetch the current file's live content. */
    readonly refresh: () => void;
}
/**
 * Read-only viewer for a single workspace file.
 *
 * A thin shell (no new rendering): it resolves the open file, drives
 * {@link useWorkspaceFileContent}, and — for displayable text — delegates to
 * the shared {@link ArtifactContentRenderer} (markdown / YAML / JSON /
 * line-numbered text). Its state body deliberately mirrors
 * `FileContentStateView` in `ArtifactPreviewModal` (same skeleton, error, and
 * delegation), extended with the three states an execution artifact never
 * has — binary, too-large, and unsupported-substrate. The two are **not**
 * merged into one shared component: their surrounding chrome (an artifact's
 * copy/download/apply bar vs. this viewer's header) differs enough that a
 * shared shell would need context-flag props. Keep them as sibling shells that
 * share the one renderer.
 *
 * Framework-agnostic and themed via `--stgm-*` tokens (DD-004/DD-005): a
 * platform builder can mount it directly given a `reader` and a selection.
 *
 * @example
 * ```tsx
 * <FileViewer
 *   selectedFile={{ entryId: entry.id, path: "src/index.ts" }}
 *   entries={workspace.entries}
 *   reader={workspaceFileReader}
 *   onClose={() => setSelected(null)}
 * />
 * ```
 */
export declare const FileViewer: import("react").ForwardRefExoticComponent<FileViewerProps & import("react").RefAttributes<FileViewerHandle>>;
//# sourceMappingURL=FileViewer.d.ts.map