import type { FileChangeSet } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/filereview_pb";
import { FileDecisionAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
import { type FileDecisionOptions } from "./useFileReview.js";
/** Props for {@link FileReviewCard}. */
export interface FileReviewCardProps {
    /** The captured change set awaiting review (status AWAITING_REVIEW). */
    readonly fileChangeSet: FileChangeSet;
    /**
     * Called when the user makes a decision. The consumer (typically
     * {@link MessageThread} or a platform builder's surface) handles the RPC via
     * {@link useFileReview}. A whole-set Approve/Reject sends `CHANGE_SET` scope;
     * a per-file Keep/Discard sends `FILE` scope with the file's id. Optional and
     * ignored when {@link FileReviewCardProps.interactive} is `false`.
     */
    readonly onSubmit?: (action: FileDecisionAction, options?: FileDecisionOptions) => void;
    /**
     * Whether the card presents decision controls. Defaults to `true` (the live
     * review surface). Set to `false` to render a **settled** change set read-only:
     * the per-file diffs and each file's committed verdict are shown, but the
     * decision controls, bulk footer, and error affordances are omitted. Used for a
     * decided/reconciled set, or any set on a terminal execution — a historical
     * record of what changed and how it was decided, not an actionable gate.
     */
    readonly interactive?: boolean;
    /**
     * Whether the expanded body renders each file's diff. Defaults to `true` —
     * the right default wherever this card is the *only* review surface (the
     * workflow file-review list, standalone platform-builder embeds).
     *
     * `MessageThread` passes `false`: the transcript's stamped edit rows already
     * show every diff in place, so the expanded body collapses to a compact file
     * list (kind letter + linked path + `+N −M` + per-file controls) and the card
     * stays purely the decision surface. Decision semantics — digests, scopes,
     * acknowledgments — are identical in both modes; this is presentation only
     * (opt-in with a backward-compatible default, DD-011).
     */
    readonly showDiffs?: boolean;
    /**
     * The decision keys currently being submitted — exactly the set
     * {@link useFileReview} returns as `submittingDecisionKeys`. A card has more
     * than one decision target (the whole set plus each file), so it takes the
     * keyed set rather than a single boolean and derives each control's in-flight
     * state via {@link fileDecisionKey}.
     */
    readonly submittingDecisionKeys?: ReadonlySet<string>;
    /**
     * Per-decision failures, keyed exactly like {@link submittingDecisionKeys}
     * (via {@link fileDecisionKey}) — the set's id for a whole-set decision, the
     * `setId:fileChangeId` for a per-file one. A failed decision is surfaced
     * in-card, beside the control that failed (and the optimistic verdict reverts),
     * so the reviewer sees *which* action did not take and why. Supply
     * {@link useFileReview}'s `decisionErrors`.
     */
    readonly decisionErrors?: ReadonlyMap<string, Error>;
    /** Additional CSS class names for the root container. */
    readonly className?: string;
}
/**
 * Renders a captured {@link FileChangeSet} as a **compact decision bar**: one
 * line carrying the set summary and the whole-set decision controls, with the
 * per-file detail behind an expander. What the expander holds depends on
 * {@link FileReviewCardProps.showDiffs}: the diff-rich body (default — for
 * surfaces where this card is the only review surface) or a compact file list
 * (the session thread, whose stamped edit rows already show every diff in
 * place). A set that needs per-file attention (binary acknowledgment, blocked
 * files, mid-review) starts expanded.
 *
 * File edits are reviewed as a captured workspace delta, not tool calls, so this
 * is a dedicated decision surface distinct from the message transcript and the
 * tool-approval {@link ApprovalCard}. The reviewer can decide each file
 * individually (Keep / Discard, a `FILE`-scoped decision) or act on the whole
 * set at once (Approve / Reject, a `CHANGE_SET` decision). Either way the runner
 * reconciles the exact approved bytes with hash verification.
 *
 * The unified HITL gate clears only when EVERY file has a verdict — one
 * `CHANGE_SET` decision, or a `FILE` decision per file — so a partially-decided
 * set stays actionable and deciding the last file is what resumes the turn. A
 * per-file verdict is changeable while the set is still open: clicking the other
 * option records a new decision (the backend reconcile is last-write-wins).
 *
 * A `binary-only` set (binary files are the only blocker) can be kept in one
 * action: the bulk button reads "Keep all" and carries the acknowledgment
 * (DD-17). A `blocked` set (something unavailable to review) cannot be approved
 * as a whole — the Approve button is disabled with an explanation, and the
 * per-file path is the escape: keep the reviewable files and discard the rest.
 *
 * Each non-reviewable file is labeled honestly by {@link fileReviewability}: a
 * `binary` change has no text diff to review; an `unavailable` change is one
 * whose diff isn't available at all, with the honest cause the runner recorded
 * (a secret path whose bytes were never captured, or a diff dropped to bound the
 * status — doc 15). Both are discard-only, and their Keep affordance is disabled
 * with the reason associated via `aria-describedby`. Files captured outside
 * normal git tracking (gitignored / non-git CAS) carry a small provenance badge
 * so the reviewer knows the change is not part of the repo's tracked history.
 *
 * Wrapped in `React.memo` — the streamed `FileChangeSet` reference is preserved
 * by structural sharing when unchanged, so review cards skip re-renders during
 * unrelated stream updates.
 *
 * @example
 * ```tsx
 * const { submitFileDecision, submittingDecisionKeys } = useFileReview();
 * <FileReviewCard
 *   fileChangeSet={changeSet}
 *   onSubmit={(action, opts) => submitFileDecision(executionId, changeSet.id, action, opts)}
 *   submittingDecisionKeys={submittingDecisionKeys}
 * />
 * ```
 */
export declare const FileReviewCard: import("react").NamedExoticComponent<FileReviewCardProps>;
//# sourceMappingURL=FileReviewCard.d.ts.map