import { InputGenerator } from './InputGenerator';
import { InterceptorConfig } from './InterceptorConfig';
export interface BaseFieldReference {
  fieldId: string;
}
export declare abstract class BaseField {
  static decode(json: any): BaseField;
  id: string;
  type: string;
  title?: string;
  errorTitle?: string;
  description?: string;
  required?: boolean;
  visible?: boolean;
  preview?: boolean;
  disabled?: boolean;
  value?: any;
  interceptors?: {
    onBlur?: InterceptorConfig[];
    onChange?: InterceptorConfig[];
    onFormChange?: InterceptorConfig[];
    onSubmit?: InterceptorConfig[];
  };
  constructor(id: string, type: string);
  render?: InputGenerator;
  getDisplayValue(value: any): any;
  /**
   * Appends new interceptor to the given interceptor type list.
   * @param type
   * @param interceptor
   */
  addInterceptor(type: 'onBlur' | 'onChange' | 'onFormChange' | 'onSubmit', interceptor: InterceptorConfig): BaseField;
  require(): BaseField;
  disable(): BaseField;
  hide(): BaseField;
  setValue(value: any): BaseField;
  setErrorTitle(title: string): BaseField;
}
export interface BaseInputProps<F extends BaseField, V> {
  disabled?: boolean;
  field: F;
  errors?: any[];
  onBlur: () => void;
  onChange: (value?: V) => void;
  value?: V;
}
