import type { SessionPlan } from "../library/detect-plan-artifact.js";
import type { PlanDraftController } from "./usePlanDraft.js";
/** Props for {@link PlanEditor}. */
export interface PlanEditorProps {
    /** The plan to display (latest, or a superseded plan opened from its card). */
    readonly plan: SessionPlan;
    /**
     * Draft controller owned by the viewer (survives panel collapse/unmounts).
     * Consulted only when editable — a read-only (superseded) plan renders its
     * own artifact text, never the current plan's draft.
     */
    readonly draft?: PlanDraftController;
    /** Builds from the plan — the same action as the thread card's primary. */
    readonly onBuildFromPlan?: () => void;
    /** Disables the Build action (execution in flight, or build submitting). */
    readonly buildDisabled?: boolean;
    /**
     * Renders the plan as a historical, read-only document: no Edit view, no
     * Build action, and a "superseded" notice. Used when the user opens a plan
     * that a newer plan has since replaced.
     */
    readonly readOnly?: boolean;
}
/**
 * The plan document for the workspace surface's editor area — the wide-pane
 * successor of the retired Plan sidebar facet, mounted as a virtual document
 * (`SurfaceVirtualDocument`) under the {@link PLAN_DOCUMENT_ENTRY_ID} tab.
 *
 * Three views over one text:
 * - **Rendered** — the plan as a document (same typography as the thread's
 *   plan rendering, title lifted from the leading H1).
 * - **Source** — the raw markdown.
 * - **Edit** — a plain-textarea editor over a LOCAL draft
 *   ({@link PlanDraftController}); the published artifact is never mutated.
 *   Building from an edited plan delivers the draft to the implement
 *   execution (edit-as-input).
 *
 * All views show the *effective* plan — the draft when one exists, the
 * published artifact otherwise — so what the user reviews is exactly what
 * Build will implement. An "Edited" indicator plus Revert makes the overlay
 * visible and reversible.
 *
 * Editing is disabled for truncated content (the content RPC caps at 512 KB):
 * editing a truncated plan would silently drop its tail on handoff. The
 * document still renders read-only with the truncation notice.
 *
 * Holds no must-survive local state: the panel region unmounts wholesale on
 * collapse, so anything that must outlive it (the draft, the fetched content
 * cache) is owned above. The view pick resetting to Rendered on reopen is
 * deliberate.
 *
 * All visual properties flow through `--stgm-*` tokens.
 */
export declare function PlanEditor({ plan, draft, onBuildFromPlan, buildDisabled, readOnly, }: PlanEditorProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=PlanEditor.d.ts.map