import { type Dispatch, type MutableRefObject, type SetStateAction } from "react";
import type { Message, Provider } from "@kenkaiiii/gg-ai";
import type { AgentTool } from "@kenkaiiii/gg-agent";
import { type LanguageId } from "../../core/language-detector.js";
import type { PreparedPixelFix } from "../../core/pixel-fix.js";
import type { SessionManager } from "../../core/session-manager.js";
import type { UseAgentLoopReturn } from "./useAgentLoop.js";
import type { RebuildSystemPromptOptions } from "./useModeState.js";
import type { CompletedItem } from "../app-items.js";
import type { DoneStatus } from "../layout-decisions.js";
/** Minimal session-store surface the pixel run-all flag mirrors into. */
interface PixelSessionStore {
    runAllPixel?: boolean;
}
interface UsePixelFixFlowOptions {
    agentLoop: UseAgentLoopReturn;
    cwd: string;
    currentProvider: Provider;
    currentModel: string;
    rebuildToolsForCwd?: (cwd: string) => Promise<AgentTool[]>;
    sessionStore?: PixelSessionStore;
    currentPixelFixRef: MutableRefObject<PreparedPixelFix | null>;
    runAllPixelRef: MutableRefObject<boolean>;
    startPixelFixRef: MutableRefObject<(errorId: string) => void>;
    cwdRef: MutableRefObject<string>;
    currentToolsRef: MutableRefObject<AgentTool[]>;
    injectedLanguagesRef: MutableRefObject<Set<LanguageId>>;
    setupHintShownRef: MutableRefObject<boolean>;
    messagesRef: MutableRefObject<Message[]>;
    persistedIndexRef: MutableRefObject<number>;
    sessionManagerRef: MutableRefObject<SessionManager | null>;
    sessionPathRef: MutableRefObject<string | undefined>;
    setDisplayedCwd: Dispatch<SetStateAction<string>>;
    setCurrentTools: Dispatch<SetStateAction<AgentTool[]>>;
    setHistory: Dispatch<SetStateAction<CompletedItem[]>>;
    setLiveItems: Dispatch<SetStateAction<CompletedItem[]>>;
    setLastUserMessage: Dispatch<SetStateAction<string>>;
    setDoneStatus: Dispatch<SetStateAction<DoneStatus | null>>;
    rebuildSystemPrompt: (options?: RebuildSystemPromptOptions) => Promise<string>;
    clearPendingHistory: () => void;
    getId: () => string;
    initialRunAllPixel: boolean;
}
export interface PixelFixFlow {
    startPixelFix: (errorId: string) => void;
    runAllPixel: boolean;
    setRunAllPixel: Dispatch<SetStateAction<boolean>>;
}
/**
 * Owns the in-Ink pixel-fix flow: swapping cwd/tools/system-prompt/banner in
 * lockstep, resetting chat state, kicking off the agent run, and the "fix all"
 * run-all flag. Extracted verbatim from `App.tsx`; see CLAUDE.md for the
 * four-things-in-lockstep contract.
 */
export declare function usePixelFixFlow({ agentLoop, cwd, currentProvider, currentModel, rebuildToolsForCwd, sessionStore, currentPixelFixRef, runAllPixelRef, startPixelFixRef, cwdRef, currentToolsRef, injectedLanguagesRef, setupHintShownRef, messagesRef, persistedIndexRef, sessionManagerRef, sessionPathRef, setDisplayedCwd, setCurrentTools, setHistory, setLiveItems, setLastUserMessage, setDoneStatus, rebuildSystemPrompt, clearPendingHistory, getId, initialRunAllPixel, }: UsePixelFixFlowOptions): PixelFixFlow;
export {};
//# sourceMappingURL=usePixelFixFlow.d.ts.map