import type { FormField } from '@funkit/connect-core'; import type { KycSectionPage } from './formLayout'; /** What a tried page comes to, once the form has re-validated. */ export type AttemptOutcome = /** This page holds a refused field: it is shown, not left. */ { kind: 'REFUSED'; } /** Clean, with pages still ahead. */ | { kind: 'TURN'; to: number; } /** The last page is clean, but an earlier one is not: back to it. */ | { kind: 'JUMP'; to: number; } | { kind: 'SUBMIT'; }; /** * Decides what a try does: refuse the page, turn it, or send the form. * * Only the last page submits, and only once every page is clean. A refusal * can hide on a page already turned — a second round arriving mid-form leaves * earlier pages blank — so rather than a Confirm that does nothing, the form * goes back to the first page still refused. */ export declare function settleAttempt({ pages, step, isRefused, }: { pages: readonly KycSectionPage[]; step: number; isRefused: (field: FormField) => boolean; }): AttemptOutcome; //# sourceMappingURL=kycFormAttempt.d.ts.map