import { InputRequirement, PuptElement, ValidationResult } from '../types'; export type RuntimeEnvironment = 'node' | 'browser'; /** * Strategy for handling inputs without defaults in non-interactive mode */ export type OnMissingDefaultStrategy = 'error' | 'skip'; export interface InputIteratorOptions { validateOnSubmit?: boolean; /** Override environment detection. Useful for testing. */ environment?: RuntimeEnvironment; /** * Pre-supply input values. Inputs with pre-supplied values will be skipped * during iteration (they won't appear as requirements to collect). */ values?: Record; /** * Enable non-interactive mode. When true, inputs are automatically filled * with their default values. Use with `onMissingDefault` to control behavior * when a required input has no default. */ nonInteractive?: boolean; /** * Strategy for handling inputs without defaults in non-interactive mode. * - 'error' (default): Throw an error if a required input has no default * - 'skip': Skip inputs without defaults, leaving them undefined */ onMissingDefault?: OnMissingDefaultStrategy; } export interface InputIterator { /** * Start the iterator by collecting input requirements from the element tree. * This is async to support components with async render methods. */ start(): Promise; current(): InputRequirement | null; submit(value: unknown): Promise; /** * Advance to the next unfilled requirement. * This is async to support re-collecting requirements from async components. */ advance(): Promise; isDone(): boolean; getValues(): Map; /** * Run through all inputs non-interactively using defaults and pre-supplied values. * This is a convenience method that handles the entire iteration loop. * * @throws Error if a required input has no default and onMissingDefault is 'error' * @returns Map of all collected values */ runNonInteractive(): Promise>; } export declare function createInputIterator(element: PuptElement, options?: InputIteratorOptions): InputIterator; //# sourceMappingURL=input-iterator.d.ts.map