import React from 'react'; import type { FormResetParams, FormValidateMessage, FormValidateParams, FormValidateResult, NamePath, TdFormProps, FieldData } from '../type'; import type { InternalFormInstance } from './interface'; export default function useInstance(props: TdFormProps & { onSubmit?: any; onValidate?: any; onReset?: any; onValuesChange?: any; }, formRef: React.RefObject, formMapRef: React.MutableRefObject>, floatingFormDataRef: React.MutableRefObject>, form: InternalFormInstance, classPrefix: string): { submit: (params?: { showErrorMessage?: boolean; }) => void; reset: (params?: FormResetParams) => void; validate: (param?: FormValidateParams) => Promise>; validateOnly: (params?: Omit) => Promise>; clearValidate: (fields?: Array) => void; setFields: (fields?: FieldData[]) => void; setFieldsValue: (fields?: Record) => void; setValidateMessage: (validateMessage: FormValidateMessage) => void; getValidateMessage: (fields?: Array) => Record; getFieldValue: (name: NamePath) => any; getFieldsValue: (nameList: string[] | boolean) => Record; onFormItemValueChange: (changedValue: Record) => void; currentElement: () => HTMLFormElement; getCurrentElement: () => HTMLFormElement; };