import { type RefObject } from 'react'; import type { Key } from 'ink'; import type { GoalAnswerInput } from '../../infra/goals/schema.js'; import { type EditorState } from '../tui/editorState.js'; import { type ApprovalScopeChoice, type PendingQuestion } from './inquiryAnswer.js'; import type { WritablePermissionScope } from './scopedPermissionStorage.js'; import type { ManagerAssignment } from './startupResolution.js'; export interface AnswerTarget { readonly pending: PendingQuestion; readonly stage: 'question' | 'decision' | 'report' | 'scope' | 'comment' | 'permission'; readonly choice: number | null; readonly scopes: readonly ApprovalScopeChoice[]; readonly answer: GoalAnswerInput; readonly permission?: WritablePermissionScope; readonly bodyOffset: number; readonly onCancel?: () => void; } export type SaveManagerAnswer = (target: PendingQuestion, answer: GoalAnswerInput, permission?: { scope: WritablePermissionScope; sentence: string; }) => Promise; export declare function useManagerQuestionAnswer(bodyWidth: number): { answerTarget: AnswerTarget | null; bodyText: string; clearAnswer: () => void; beginAnswer: (target: PendingQuestion, assignment: ManagerAssignment, onCancel?: () => void) => void; switchToFreeText: () => void; handleNavigation: (key: Key, editorRef: RefObject) => boolean; handleInput: (key: Key, submitInput: boolean, editorRef: RefObject, edit: (next: EditorState) => void, saveAnswer: SaveManagerAnswer) => boolean; }; //# sourceMappingURL=useManagerQuestionAnswer.d.ts.map