import type { FormInstance, FormProps, DrawerProps, ButtonProps } from "antd"; import { type UseFormProps as UseFormPropsCore, type HttpError, type LiveModeProps, type BaseRecord, type FormWithSyncWithLocationParams, type BaseKey } from "@refinedev/core"; import { type UseFormProps, type UseFormReturnType } from "../useForm"; import type { DeleteButtonProps } from "../../../components"; export interface UseDrawerFormConfig { action: "show" | "edit" | "create" | "clone"; } export type UseDrawerFormProps = UseFormPropsCore & UseFormProps & UseDrawerFormConfig & LiveModeProps & FormWithSyncWithLocationParams & { defaultVisible?: boolean; autoSubmitClose?: boolean; autoResetForm?: boolean; }; export type UseDrawerFormReturnType = UseFormReturnType & { formProps: FormProps & { form: FormInstance; }; show: (id?: BaseKey) => void; close: () => void; drawerProps: DrawerProps; saveButtonProps: ButtonProps; deleteButtonProps: DeleteButtonProps; formLoading: boolean; }; /** * `useDrawerForm` hook allows you to manage a form within a drawer. It returns Ant Design {@link https://ant.design/components/form/ Form} and {@link https://ant.design/components/drawer/ Drawer} components props. * * @see {@link https://refine.dev/docs/api-reference/antd/hooks/form/useDrawerForm} for more details. * * @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`} * @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`} * @typeParam TVariables - Values for params. default `{}` * * */ export declare const useDrawerForm: ({ syncWithLocation, defaultVisible, autoSubmitClose, autoResetForm, autoSave, invalidates, ...rest }: UseDrawerFormProps) => UseDrawerFormReturnType; //# sourceMappingURL=useDrawerForm.d.ts.map