import type { Field, FlattenedField, TabAsField } from '../fields/config/types.js';
type TraverseFieldsCallbackArgs = {
    /**
     * The current field
     */
    field: Field | TabAsField;
    /**
     * Function that when called will skip the current field and continue to the next
     */
    next?: () => void;
    /**
     * The parent reference object
     */
    parentRef?: Record<string, unknown> | unknown;
    /**
     * The current reference object
     */
    ref?: Record<string, unknown> | unknown;
};
export type TraverseFieldsCallback = (args: TraverseFieldsCallbackArgs) => boolean | void;
export type TraverseFlattenedFieldsCallback = (args: {
    /**
     * The current field
     */
    field: FlattenedField;
    /**
     * Function that when called will skip the current field and continue to the next
     */
    next?: () => void;
    /**
     * The parent reference object
     */
    parentRef?: Record<string, unknown> | unknown;
    /**
     * The current reference object
     */
    ref?: Record<string, unknown> | unknown;
}) => boolean | void;
type TraverseFlattenedFieldsArgs = {
    callback: TraverseFlattenedFieldsCallback;
    fields?: Field[];
    /** fill empty properties to use this without data */
    fillEmpty?: boolean;
    flattenedFields: FlattenedField[];
    parentRef?: Record<string, unknown> | unknown;
    ref?: Record<string, unknown> | unknown;
};
type TraverseFieldsArgs = {
    callback: TraverseFieldsCallback;
    fields: (Field | FlattenedField | TabAsField)[];
    /** fill empty properties to use this without data */
    fillEmpty?: boolean;
    flattenedFields?: FlattenedField[];
    parentRef?: Record<string, unknown> | unknown;
    ref?: Record<string, unknown> | unknown;
};
/**
 * Iterate a recurse an array of fields, calling a callback for each field
 *
 * @param fields
 * @param callback callback called for each field, discontinue looping if callback returns truthy
 * @param fillEmpty fill empty properties to use this without data
 * @param ref the data or any artifacts assigned in the callback during field recursion
 * @param parentRef the data or any artifacts assigned in the callback during field recursion one level up
 */
export declare const traverseFields: ({ callback, fields, fillEmpty, flattenedFields, parentRef, ref, }: TraverseFieldsArgs | TraverseFlattenedFieldsArgs) => void;
export {};
//# sourceMappingURL=traverseFields.d.ts.map