import { type Request, type Server } from '@hapi/hapi';
import { FormModel } from '../../../../server/plugins/engine/models/index.js';
import { type PageController } from '../../../../server/plugins/engine/pageControllers/PageController.js';
import { type FormContext, type FormSubmissionError } from '../../../../server/plugins/engine/types.js';
import { FormStatus } from '../../../../server/routes/types.js';
import { type Services } from '../../../../server/types.js';
type JourneyState = FormStatus | 'preview';
export interface FormModelOptions {
    services?: Services;
    controllers?: Record<string, typeof PageController>;
    basePath?: string;
    ordnanceSurveyApiKey?: string;
    formId?: string;
    routePrefix?: string;
    isPreview?: boolean;
}
export interface FormContextOptions extends FormModelOptions {
    errors?: FormSubmissionError[];
}
export declare function getFormModel(slug: string, state: JourneyState, options?: FormModelOptions): Promise<FormModel>;
export declare function getFormContext({ server, yar }: Pick<Request, 'server' | 'yar'>, slug: string, state?: JourneyState, options?: FormContextOptions): Promise<FormContext>;
export declare function resolveFormModel(server: Server, slug: string, state: JourneyState, options?: FormModelOptions): Promise<FormModel>;
export declare function getFirstJourneyPage(context?: Pick<FormContext, 'relevantPages'>): import("../../../../server/plugins/engine/pageControllers/index.js").StartPageController | import("../../../../server/plugins/engine/pageControllers/index.js").QuestionPageController | import("../../../../server/plugins/engine/pageControllers/index.js").RepeatPageController | undefined;
export {};
