import React from "react"; import { type UseFormProps as UseHookFormProps, type UseFormReturn, type FieldValues } from "react-hook-form"; import { type BaseRecord, type HttpError, type UseFormProps as UseFormCoreProps, type UseFormReturnType as UseFormReturnTypeCore } from "@refinedev/core"; export type UseFormReturnType = UseFormReturn & { refineCore: UseFormReturnTypeCore; saveButtonProps: { disabled: boolean; onClick: (e: React.BaseSyntheticEvent) => void; }; }; export type UseFormProps = { /** * Configuration object for the core of the [useForm](/docs/api-reference/core/hooks/useForm/) * @type [`UseFormCoreProps`](/docs/api-reference/core/hooks/useForm/#properties) */ refineCoreProps?: UseFormCoreProps; /** * When you have unsaved changes and try to leave the current page, **refine** shows a confirmation modal box. * @default `false*` */ warnWhenUnsavedChanges?: boolean; /** * Disables server-side validation * @default false * @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/} */ disableServerSideValidation?: boolean; } & UseHookFormProps; export declare const useForm: ({ refineCoreProps, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, disableServerSideValidation: disableServerSideValidationProp, ...rest }?: UseFormProps) => UseFormReturnType; //# sourceMappingURL=index.d.ts.map