import React from 'react'; import type { CheckTriggerType } from '../internals/types'; import type { FieldRuleType } from './hooks/useSchemaModel'; type RecordAny = Record; interface TrulyFormContextValue { formError: E; nestedField: boolean; removeFieldValue: (name: string) => void; removeFieldError: (name: string) => void; removeFieldRule: (name: string) => void; pushFieldRule: (name: string, fieldRule: FieldRuleType) => void; onFieldChange: (name: string, value: any, event?: React.SyntheticEvent) => void; checkFieldForNextValue: (name: string, nextValue: Record, callback?: (checkResult: Record) => void) => boolean; checkFieldAsyncForNextValue: (name: string, nextValue: Record) => Promise>; } type ExternalPropsContextValue = { checkTrigger?: CheckTriggerType; errorFromContext?: boolean; readOnly?: boolean; plaintext?: boolean; disabled?: boolean; }; type InitialContextType = Partial>; export type FormContextValue = (TrulyFormContextValue | InitialContextType) & ExternalPropsContextValue; export declare const FormContext: React.Context>; export declare const FormValueContext: React.Context; export declare const FormProvider: React.Provider>; export declare const FormValueProvider: React.Provider; export declare function useFormContext(): FormContextValue; export default FormContext;