import { UseCustomMutationReturnType, UseLoadingOvertimeReturnType, BaseRecord, HttpError } from '@refinedev/core'; import { FormInstance } from 'antd'; type TUseSaveParams = { form: FormInstance; url?: string; }; type TUseSaveReturn = { /** 處理儲存表單的函數 */ handleSave: () => void; /** useCustomMutation 的回傳值,包含 mutation 狀態和方法 */ mutation: UseCustomMutationReturnType & UseLoadingOvertimeReturnType; }; /** * 用於處理表單儲存的自定義 Hook * @param props - Hook 的參數 * @param props.form - Antd Form 實例,用於獲取和驗證表單數據 * @returns 包含儲存處理函數和 mutation 狀態的物件 */ export declare const useSave: ({ form, url }: TUseSaveParams) => TUseSaveReturn; export {};