/**
 * Generic field traversal utility
 *
 * Walks through a nested field structure, visiting each field.
 * Handles groups with child fields recursively.
 */
import type { TraversableField, FieldVisitor, TraverseOptions } from './types.js';
/**
 * Traverse fields recursively, calling visitor for each field
 *
 * @param fields - Array of fields to traverse
 * @param visitor - Callback function called for each field
 * @param options - Traversal options
 *
 * @example
 * ```ts
 * const all_ids: string[] = [];
 *
 * traverse_fields(fields, (field) => {
 *   all_ids.push(field.id);
 * });
 *
 * // With parent tracking
 * traverse_fields(fields, (field, parent) => {
 *   if (parent) {
 *     console.log(`${field.id} is child of ${parent.id}`);
 *   }
 * });
 * ```
 */
export declare function traverse_fields<T extends TraversableField = TraversableField>(fields: T[], visitor: FieldVisitor<T>, options?: TraverseOptions): void;
/**
 * Traverse sections, processing all fields within groups
 *
 * @param sections - Array of sections to traverse
 * @param visitor - Callback function called for each field
 * @param options - Traversal options
 *
 * @example
 * ```ts
 * traverse_sections(sections, (field, parent, depth) => {
 *   console.log(`Field ${field.id} at depth ${depth}`);
 * });
 * ```
 */
export declare function traverse_sections<T extends TraversableField = TraversableField, S extends {
    groups?: T[];
} = {
    groups?: T[];
}>(sections: S[], visitor: FieldVisitor<T>, options?: TraverseOptions): void;
//# sourceMappingURL=traverse_fields.d.ts.map