import { FieldProps, WidgetProps } from "../types";
export interface SubmitHook {
    hook: () => void;
    promise: Promise<any>;
    lajiFormId: string;
    relativePointer: string;
    running: boolean;
    description?: string;
    failed?: boolean;
    e?: string;
}
export default class SubmitHookService {
    private onSubmitHooksChange;
    private submitHooks;
    constructor(onSubmitHooksChange: (submitHooks: SubmitHook[]) => void);
    private send;
    private internalAdd;
    /**
     * Add a submit hook for a Field component.
     */
    add(props: Pick<FieldProps<any, any>, "formData" | "idSchema" | "formContext"> | Pick<WidgetProps<any, any>, "formData" | "id" | "formContext">, hook: SubmitHook["hook"]): () => Promise<any>;
    /** Remove a hook either by id or hook instance */
    remove(lajiFormId?: string, hook?: SubmitHook["hook"]): Promise<void>;
    removeAll(): void;
    checkHooks(): Promise<void[]>;
}
