import { FieldValues, UseFormReturn } from 'react-hook-form';
import { TaskState } from './TaskState';
import { WidgetState, WidgetsFormState } from './WidgetsFormState';
export interface FormPageProps<V extends FieldValues = FieldValues> {
    /**
     * An object representing the form state and methods, typically returned by a useForm hook.
     */
    form: UseFormReturn<V>;
    widgets?: WidgetsFormState;
}
export declare class FormPageState<V extends FieldValues = FieldValues> {
    readonly _widgets: WidgetsFormState;
    readonly _form: UseFormReturn<V>;
    readonly initTask: TaskState<unknown>;
    readonly submitTask: TaskState<unknown>;
    _isSubmitSuccessful?: boolean;
    _isFormDirty: boolean;
    constructor(props: FormPageProps<V>);
    set isFormDirty(flag: boolean);
    get isDirty(): boolean;
    get form(): UseFormReturn<V, any, V>;
    get isFetching(): boolean;
    set isSubmitSuccessful(flag: boolean);
    retryFetch(): void;
    /**
     * For backward compatibility, keep this as validate, but it only validates widgets.
     */
    validate(): Promise<{
        isValid: boolean;
        data: Record<string, any>;
    }>;
    registerWidget(key: string, state: WidgetState): void;
    getWidgetState(key: string): WidgetState | undefined;
}
//# sourceMappingURL=FormPageState.d.ts.map