import type { Config, FormApi, SubmissionErrors } from 'final-form'; import type { FC } from 'react'; export { ISelectProps } from '../SelectField/SelectField'; export interface IFormActionProps { isNew?: boolean; submitLabel?: string; cancelLabel?: string; onCancel?: VoidFunction; hideCancel?: boolean; } export declare type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; }; export declare type EditingFields = { [P in keyof T]?: T[P] extends object ? EditingFields : T[P] | string; }; export declare type AsyncValidate = Config['validate']; export declare type FormSubmitHandler = (values: EditingFields, form: FormApi>, callback?: (errors?: SubmissionErrors) => void) => Promise | void; export declare type FormResultHandler = (fields: F) => Promise; interface IFormWrapperProps extends Partial>, 'onSubmit'>> { onResult: FormResultHandler; initialValues: EditingFields; } export declare type FormComponent = FC & P>;