import { type MutableRefObject } from "react";
import type { Message, Provider } from "@prestyj/ai";
import type { AgentTool } from "@prestyj/agent";
import type { LanguageId } from "../../core/language-detector.js";
import type { Skill } from "../../core/skills.js";
import type { GoalMode } from "../../core/runtime-mode.js";
/** Options accepted by {@link useModeState.rebuildSystemPrompt}. */
export interface RebuildSystemPromptOptions {
    cwd?: string;
    approvedPlanPath?: string;
    clearApprovedPlan?: boolean;
    activeLanguages?: Set<LanguageId>;
    tools?: AgentTool[];
    planMode?: boolean;
}
/** Minimal session-store surface the mode state mirrors into for remount survival. */
interface ModeSessionStore {
    planMode?: boolean;
    goalMode?: GoalMode;
}
interface UseModeStateOptions {
    initialPlanMode: boolean;
    initialGoalMode?: GoalMode;
    skills: Skill[] | undefined;
    planModeRef?: {
        current: boolean;
    };
    goalModeRef?: {
        current: GoalMode;
    };
    sessionStore?: ModeSessionStore;
    cwdRef: MutableRefObject<string>;
    currentToolsRef: MutableRefObject<AgentTool[]>;
    providerRef: MutableRefObject<Provider>;
    approvedPlanPathRef: MutableRefObject<string | undefined>;
    injectedLanguagesRef: MutableRefObject<Set<LanguageId>>;
    messagesRef: MutableRefObject<Message[]>;
}
export interface ModeState {
    planMode: boolean;
    goalMode: GoalMode;
    planModeStateRef: MutableRefObject<boolean>;
    goalModeStateRef: MutableRefObject<GoalMode>;
    rebuildSystemPrompt: (options?: RebuildSystemPromptOptions) => Promise<string>;
    replaceSystemPrompt: (options?: RebuildSystemPromptOptions) => Promise<string>;
    setPlanModeAndPrompt: (nextMode: boolean) => Promise<void>;
    setGoalModeAndPrompt: (nextMode: GoalMode) => Promise<void>;
}
/**
 * Owns the `planMode` runtime state and the system-prompt rebuild cluster
 * (`rebuildSystemPrompt`, `replaceSystemPrompt`, `setPlanModeAndPrompt`).
 * Extracted from `App.tsx` as a self-contained controller.
 */
export declare function useModeState({ initialPlanMode, initialGoalMode, skills, planModeRef, goalModeRef, sessionStore, cwdRef, currentToolsRef, providerRef, approvedPlanPathRef, injectedLanguagesRef, messagesRef, }: UseModeStateOptions): ModeState;
export {};
//# sourceMappingURL=useModeState.d.ts.map