import { type BaseKey, type BaseRecord, type FormWithSyncWithLocationParams, type HttpError } from "@refinedev/core";
import type { FieldValues } from "react-hook-form";
import { type UseFormProps, type UseFormReturnType } from "../useForm";
export type UseModalFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnType<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError> & {
    modal: {
        submit: (values: TVariables) => void;
        close: () => void;
        show: (id?: BaseKey) => void;
        visible: boolean;
        title: string;
    };
};
export type UseModalFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormProps<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError> & {
    /**
       * @description Configuration object for the modal.
       * `defaultVisible`: Initial visibility state of the modal.
       *
       * `autoSubmitClose`: Whether the form should be submitted when the modal is closed.
       *
       * `autoResetForm`: Whether the form should be reset when the form is submitted.
       *
       * `autoResetFormWhenClose`: Whether the form should be reset to defaultValues when the modal is closed.
       * @type `{
        defaultVisible?: boolean;
        autoSubmitClose?: boolean;
        autoResetForm?: boolean;
        autoResetFormWhenClose?: boolean;
        }`
       * @default `defaultVisible = false` `autoSubmitClose = true` `autoResetForm = true` `autoResetFormWhenClose = true`
       */
    modalProps?: {
        defaultVisible?: boolean;
        autoSubmitClose?: boolean;
        autoResetForm?: boolean;
        autoResetFormWhenClose?: boolean;
    };
} & FormWithSyncWithLocationParams;
export declare const useModalForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ modalProps, refineCoreProps, syncWithLocation, ...rest }?: UseModalFormProps<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>) => UseModalFormReturnType<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>;
//# sourceMappingURL=index.d.ts.map