import type { MasterPatternViewEntity } from '../types/service.types'; import type { MasterPatternViewService } from '../types/service.types'; import type { MasterPatternViewDefinition } from '../types/definition.types'; import type { MasterPatternViewActionType } from '../types/permissions.types'; import type { ToastCallback } from './useToast'; export interface UseMasterFormOptions { definition: MasterPatternViewDefinition; service: MasterPatternViewService; validate?: (values: Partial) => Record; onCreateSuccess?: (record: T) => void; onUpdateSuccess?: (record: T) => void; toast?: ToastCallback; showInternalToasts?: boolean; /** Translation function — used for toast messages and validation error messages. */ t?: (key: string, defaultValue?: string) => string; onFormSave?: (mode: 'creating' | 'editing', values: Record, originalRecord?: T) => void | Promise; onError?: (error: Error, action: MasterPatternViewActionType) => void; } export declare function useMasterForm({ definition, service, validate, onCreateSuccess, onUpdateSuccess, toast: toastProp, showInternalToasts, t, onFormSave, onError, }: UseMasterFormOptions): { submit: () => Promise; isSubmitting: boolean; }; //# sourceMappingURL=useMasterForm.d.ts.map