import type { LunaticState } from './type'; export declare enum ActionKind { GO_PREVIOUS_PAGE = "use-lunatic/go-previous", GO_NEXT_PAGE = "use-lunatic/go-next", GO_TO_PAGE = "use-lunatic/go-to-page", HANDLE_CHANGES = "use-lunatic/handle-changes" } export type ActionHandleChanges = { type: ActionKind.HANDLE_CHANGES; payload: { responses: { name: string; value: unknown; iteration?: number[]; /** Force a vector when an iteration is set and the value was a scalar **/ ignoreIterationOnScalar?: boolean; [extra: string]: unknown; }[]; }; }; export type ActionGoToPage = { type: ActionKind.GO_TO_PAGE; payload: Parameters[0]; }; export type ActionGoNextPage = { type: ActionKind.GO_NEXT_PAGE; payload: object; }; export type ActionGoPreviousPage = { type: ActionKind.GO_PREVIOUS_PAGE; payload: object; }; export type Action = ActionGoNextPage | ActionGoPreviousPage | ActionGoToPage | ActionHandleChanges; export type PayloadForAction = (Action & { type: T; })['payload']; export declare const goPreviousPageAction: () => { readonly type: ActionKind.GO_PREVIOUS_PAGE; readonly payload: {}; }; export declare const goNextPageAction: (payload: object) => ActionGoNextPage & { type: ActionKind.GO_NEXT_PAGE; }; export declare const goToPageAction: (payload: { page: import("./type").PageTag | number; iteration?: number; nbIterations?: number; subPage?: number; }) => ActionGoToPage & { type: ActionKind.GO_TO_PAGE; }; export declare const handleChangesAction: (responses: ActionHandleChanges["payload"]["responses"]) => Action;