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;
    /**
     * 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<import("@hapi/hapi").ResponseObject>;
    /**
     * 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<import("@hapi/hapi").ResponseObject>;
    handleFormSubmit(request: FormRequestPayload, context: FormContext, h: FormResponseToolkit): Promise<import("@hapi/hapi").ResponseObject>;
    get postRouteOptions(): RouteOptions<FormRequestPayloadRefs>;
}
export declare function submitForm(context: FormContext, request: FormRequestPayload, summaryViewModel: SummaryViewModel, model: FormModel, emailAddress: string, formMetadata: FormMetadata): Promise<void>;
export declare function getFormSubmissionData(context: FormContext, details: Detail[]): DetailItem[];
