import { type FormMetadata, type Page } from '@defra/forms-model'; import { type RouteOptions } from '@hapi/hapi'; import { SummaryViewModel, type FormModel } from '~/src/server/plugins/engine/models/index.js'; import { type Detail, type DetailItem } from '~/src/server/plugins/engine/models/types.js'; import { QuestionPageController } from '~/src/server/plugins/engine/pageControllers/QuestionPageController.js'; import { type FormContext, type FormContextRequest } from '~/src/server/plugins/engine/types.js'; import { type FormRequest, type FormRequestPayload, type FormRequestPayloadRefs, type FormResponseToolkit } from '~/src/server/routes/types.js'; export declare class SummaryPageController extends QuestionPageController { pageDef: Page; allowSaveAndExit: boolean; /** * The controller which is used when Page["controller"] is defined as "./pages/summary.js" */ constructor(model: FormModel, pageDef: Page); getSummaryViewModel(request: FormContextRequest, context: FormContext): SummaryViewModel; private buildPaymentDetails; /** * Returns an async function. This is called in plugin.ts when there is a GET request at `/{id}/{path*}`, */ makeGetRouteHandler(): (request: FormRequest, context: FormContext, h: FormResponseToolkit) => Promise; /** * Returns an async function. This is called in plugin.ts when there is a POST request at `/{id}/{path*}`. * If a form is incomplete, a user will be redirected to the start page. */ makePostRouteHandler(): (request: FormRequestPayload, context: FormContext, h: FormResponseToolkit) => Promise; handleFormSubmit(request: FormRequestPayload, context: FormContext, h: FormResponseToolkit): Promise; /** * Handles errors during form submission */ private handleSubmissionError; /** * Handles InvalidComponentStateError during submission */ private handleInvalidComponentStateError; /** * Handles PaymentPreAuthError during submission */ private handlePaymentPreAuthError; /** * Handles PaymentSubmissionError during submission */ private handlePaymentSubmissionError; get postRouteOptions(): RouteOptions; } export declare function submitForm(context: FormContext, formMetadata: FormMetadata, request: FormRequestPayload, summaryViewModel: SummaryViewModel, model: FormModel, emailAddress: string): Promise; export declare function getFormSubmissionData(context: FormContext, details: Detail[]): DetailItem[];