import type { QuestionAnswer } from "../tool/types.js";
import type { QuestionnaireRuntime, QuestionnaireState } from "./state.js";
export type QuestionnaireAction = {
    kind: "nav";
    nextIndex: number;
} | {
    kind: "tab_switch";
    nextTab: number;
} | {
    kind: "confirm";
    answer: QuestionAnswer;
    autoAdvanceTab?: number;
} | {
    kind: "toggle";
    index: number;
} | {
    kind: "multi_confirm";
    selected: string[];
    autoAdvanceTab?: number;
} | {
    kind: "cancel";
} | {
    kind: "notes_enter";
} | {
    kind: "notes_exit";
} | {
    kind: "submit";
} | {
    kind: "submit_nav";
    nextIndex: 0 | 1;
} | {
    kind: "focus_chat";
}
/**
 * Carries the target index so UP/DOWN form a continuous cycle through
 * `[chat, option0, …, optionLast]`.
 */
 | {
    kind: "focus_options";
    optionIndex: number;
} | {
    kind: "notes_forward";
    data: string;
} | {
    kind: "ignore";
};
export interface QuestionnaireKeybindings {
    matches(data: string, name: string): boolean;
}
export declare function wrapTab(index: number, total: number): number;
export declare function allAnswered(state: QuestionnaireState, runtime: QuestionnaireRuntime): boolean;
export declare function routeKey(data: string, state: QuestionnaireState, runtime: QuestionnaireRuntime): QuestionnaireAction;
//# sourceMappingURL=key-router.d.ts.map