import type { QuestionAnswerEntry, QuestionRecord } from './types.js'; interface QuestionUiInput { isTTY?: boolean; on(event: 'keypress', listener: (str: string, key: KeyLike) => void): this; off(event: 'keypress', listener: (str: string, key: KeyLike) => void): this; resume?(): void; pause?(): void; setRawMode?(mode: boolean): void; } interface QuestionUiOutput { isTTY?: boolean; write(chunk: string): boolean; } interface QuestionUiDeps { input?: QuestionUiInput; output?: QuestionUiOutput; env?: NodeJS.ProcessEnv; injectAnswersToPane?: (paneId: string, answers: QuestionAnswerEntry[]) => boolean; } interface InteractiveSelectionState { cursorIndex: number; selectedIndices: number[]; error?: string; } interface SelectionUpdate { state: InteractiveSelectionState; submit: boolean; } interface KeyLike { name?: string; ctrl?: boolean; sequence?: string; } interface WizardState { currentQuestionIndex: number; selections: InteractiveSelectionState[]; /** * Free-text answers collected inline when the user picks the "Other" option for * a question. `undefined` until collected; once set, the wizard does not * re-prompt unless the selection is changed. */ otherTexts: Array; mode: 'answering' | 'review'; error?: string; } interface WizardUpdate { state: WizardState; submit: boolean; /** * When set, the wizard cannot advance from this question until the caller * collects the free-text "Other" answer for the question at this index and * stores it in `state.otherTexts`. */ needsOtherText?: number; } export declare function createInitialInteractiveSelectionState(): InteractiveSelectionState; export declare function applyInteractiveSelectionKey(record: QuestionRecord, state: InteractiveSelectionState, key: KeyLike): SelectionUpdate; export declare function renderInteractiveQuestionFrame(record: QuestionRecord, state: InteractiveSelectionState): string; export declare function createInitialQuestionWizardState(record: QuestionRecord): WizardState; export declare function applyQuestionWizardKey(record: QuestionRecord, state: WizardState, key: KeyLike): WizardUpdate; export declare function renderQuestionWizardFrame(record: QuestionRecord, state: WizardState): string; export declare function promptForSelectionsWithArrows(record: QuestionRecord, deps?: QuestionUiDeps): Promise; export declare function runQuestionUi(recordPath: string, deps?: QuestionUiDeps): Promise; export {}; //# sourceMappingURL=ui.d.ts.map