import { type MutableRefObject } from "react";
import type { Message, Provider, ThinkingLevel } from "@kenkaiiii/gg-ai";
import type { AgentTool } from "@kenkaiiii/gg-agent";
import type { LanguageId } from "../../core/language-detector.js";
import type { Skill } from "../../core/skills.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;
}
interface UseModeStateOptions {
    initialPlanMode: boolean;
    skills: Skill[] | undefined;
    planModeRef?: {
        current: boolean;
    };
    sessionStore?: ModeSessionStore;
    cwdRef: MutableRefObject<string>;
    currentToolsRef: MutableRefObject<AgentTool[]>;
    providerRef: MutableRefObject<Provider>;
    modelRef: MutableRefObject<string>;
    thinkingLevelRef: MutableRefObject<ThinkingLevel | undefined>;
    approvedPlanPathRef: MutableRefObject<string | undefined>;
    injectedLanguagesRef: MutableRefObject<Set<LanguageId>>;
    messagesRef: MutableRefObject<Message[]>;
}
export interface ModeState {
    planMode: boolean;
    planModeStateRef: MutableRefObject<boolean>;
    rebuildSystemPrompt: (options?: RebuildSystemPromptOptions) => Promise<string>;
    replaceSystemPrompt: (options?: RebuildSystemPromptOptions) => Promise<string>;
    setPlanModeAndPrompt: (nextMode: boolean) => 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, skills, planModeRef, sessionStore, cwdRef, currentToolsRef, providerRef, modelRef, thinkingLevelRef, approvedPlanPathRef, injectedLanguagesRef, messagesRef, }: UseModeStateOptions): ModeState;
export {};
//# sourceMappingURL=useModeState.d.ts.map