/** * Questions asked in a small form drawn over the dashboard * (operator-console/AC-32, operator-console/AC-35, operator-console/AC-42). * * `formKey` is pure: a key in, the form or its answer out. `formPrompter` turns a * host that can show a form into a `Prompter`, so a command run under * `withPrompter` asks its questions here instead of in the scroll-back. Esc answers * `cancelled`, which every command already treats as "run nothing". * * @module */ import type { PromptResult, Prompter } from '../../core/prompt.js'; import type { FormState, KeyName } from './model.js'; export interface FormStep { form: FormState; /** Set once the form is answered or cancelled. */ done: PromptResult | null; } export declare function formKey(f: FormState, key: KeyName): FormStep; /** The keys a form takes, for the key bar while it is open. */ export declare function formKeys(f: FormState): string; export interface FormHost { show(f: FormState): Promise>; /** `intro`, `outro` and `note` become output lines of the running command. */ say(line: string): void; } /** A `Prompter` that asks every question in a form the host draws (operator-console/AC-42). */ export declare function formPrompter(host: FormHost): Prompter; //# sourceMappingURL=form.d.ts.map