import type { ZodErrorLike, ZodTypeLike } from '@douglasneuroinformatics/libjs'; import type { FormContent, FormDataType, PartialFormDataType, PartialNullableFormDataType } from '@douglasneuroinformatics/libui-form-types'; import type { Promisable } from 'type-fest'; type FormSubmitResult = { errorMessage: string; success: false; } | { success: true; }; type FormSubmitHandler = (data: NoInfer) => Promisable; type FormProps, TData extends TSchema['_output'] = TSchema['_output']> = { [key: `data-${string}`]: unknown; additionalButtons?: { left?: React.ReactNode; right?: React.ReactNode; }; className?: string; content: FormContent; customStyles?: { resetBtn?: string; submitBtn?: string; }; fieldsFooter?: React.ReactNode; id?: string; initialValues?: PartialNullableFormDataType>; onBeforeSubmit?: FormSubmitHandler> | null; onError?: (error: ZodErrorLike) => void; onSubmit: FormSubmitHandler>; preventResetValuesOnReset?: boolean; readOnly?: boolean; resetBtn?: boolean; revalidateOnBlur?: boolean; submitBtnLabel?: string; subscribe?: { onChange: (values: PartialFormDataType, setValues: React.Dispatch>>) => Promisable; selector: (values: PartialFormDataType) => unknown; }; suspendWhileSubmitting?: boolean; validationSchema: ZodTypeLike; }; declare const Form: , TData extends TSchema["_output"] = TSchema["_output"]>({ additionalButtons, className, content, customStyles, fieldsFooter, id, initialValues, onBeforeSubmit, onError, onSubmit, preventResetValuesOnReset, readOnly, resetBtn, revalidateOnBlur, submitBtnLabel, subscribe, suspendWhileSubmitting, validationSchema, ...props }: FormProps) => import("react/jsx-runtime").JSX.Element; export { Form, type FormProps }; //# sourceMappingURL=Form.d.ts.map