import { Progress, VisitOptions } from "@inertiajs/inertia"; export interface ExtendedVisitOptions extends VisitOptions { usingAxios?: boolean; } export interface FormProps { isDirty: boolean; errors: Record; hasErrors: boolean; processing: boolean; progress: Progress | null; wasSuccessful: boolean; recentlySuccessful: boolean; previewMode: boolean; setPreviewMode(value: any): this; setField(key: any, value: any): this; onReset(fieldName: any, callback: any): this; data(): TForm; transform(callback: (data: TForm) => object): this; defaults(): this; defaults(field: keyof TForm, value: string): this; defaults(fields: Record): this; reset(...fields: (keyof TForm)[]): this; clearErrors(...fields: (keyof TForm)[]): this; setError(field: keyof TForm, value: string): this; setError(errors: Record): this; submit(method: string, url: string, options?: Partial): void; get(url: string, options?: Partial): void; post(url: string, options?: Partial): void; put(url: string, options?: Partial): void; patch(url: string, options?: Partial): void; delete(url: string, options?: Partial): void; cancel(): void; } export declare type Form = TForm & FormProps; export declare function useForm(...args: any[]): Form; export default useForm;