import PropTypes from 'prop-types'; import React from 'react'; import { RequiredValidation, ValidationError, Validations } from './interfaces'; export declare const propTypes: { innerRef: PropTypes.Requireable<(...args: any[]) => any>; name: PropTypes.Validator; required: PropTypes.Requireable; validations: PropTypes.Requireable; value: PropTypes.Requireable; }; export interface WrapperProps { innerRef?: (ref: React.Ref) => void; name: string; required?: RequiredValidation; validationError?: ValidationError; validationErrors?: { [key: string]: ValidationError; }; validations?: Validations; value?: V; } export interface WrapperState { [key: string]: unknown; formSubmitted: boolean; isPristine: boolean; isRequired: boolean; isValid: boolean; pristineValue: V; validationError: ValidationError[]; value: V; } export interface InjectedProps { errorMessage: ValidationError; errorMessages: ValidationError[]; hasValue: boolean; isFormDisabled: boolean; isFormSubmitted: boolean; isPristine: boolean; isRequired: boolean; isValid: boolean; isValidValue: (value: V) => boolean; ref?: React.Ref; resetValue: () => void; setValidations: (validations: Validations, required: RequiredValidation) => void; setValue: (value: V, validate?: boolean) => void; showError: boolean; showRequired: boolean; } export interface WrapperInstanceMethods { getErrorMessage: () => null | ValidationError; getErrorMessages: () => ValidationError[]; getValue: () => V; isFormDisabled: () => boolean; isFormSubmitted: () => boolean; isValid: () => boolean; isValidValue: (value: V) => boolean; setValue: (value: V, validate?: boolean) => void; } export declare type PassDownProps = WrapperProps & InjectedProps; export default function withFormsy(WrappedComponent: React.ComponentType>): React.ComponentType, keyof InjectedProps>>;