import { BaseField } from '../BaseField';
import { FormContext } from '../form/FormContext';
import { InterceptorBundle } from '../form/InterceptorBundle';
import { Values } from '../form/Values';
import { InterceptorConfig } from './InterceptorConfig';
import { InterceptorHandler } from './InterceptorHandler';
import { InterceptorHandlerResponse } from './InterceptorHandlerResponse';
/**
 * Saves the interceptor into the interceptorTypeMap.
 * @param interceptorType is the identifier of the interceptor.
 * @param generator function that is expected to generate the interceptor with the given config.
 */
export declare function registerInterceptor(interceptorType: string, generator: InterceptorGenerator): void;
/**
 * Generates an interceptor handler with the given config.
 *
 * @param config that contains all the parameters that the interceptor needs.
 */
export declare function generateInterceptor(config: InterceptorConfig): InterceptorHandler | undefined;
/**
 * Executes the given interceptors in order. Passes the response of each interceptor's result to the next
 * interceptor. Returns error of the first failed interceptor or returns the result of the last interceptor
 * if none returns an error.
 *
 * @param context of the form.
 * @param values of the fields in the form.
 * @param field that is being executed.
 * @param value that the interceptor will process.
 * @param visibility of the current field.
 * @param interceptorBundle that contains interceptor list for each type.
 * @param interceptorType that is expected to be used.
 * @param boundField is the field that the interceptor is bound to. Used only for 'onFormChange' interceptor types.
 */
export declare function executeInterceptors(context: FormContext, values: Values, field: BaseField, value: any, visibility: boolean, interceptorBundle?: InterceptorBundle, interceptorType?: 'onBlur' | 'onChange' | 'onFormChange' | 'onSubmit', boundField?: BaseField): InterceptorHandlerResponse;
export declare type InterceptorGenerator = (config: InterceptorConfig) => InterceptorHandler | undefined;
