/**
 * The postcode lookup details form view model
 * @param {PostcodeLookupSessionData} data
 * @param {PostcodeLookupDetailsData} [payload]
 * @param {Error} [err]
 */
export function detailsViewModel(data: PostcodeLookupSessionData, payload?: PostcodeLookupDetailsData, err?: Error): {
    step: string;
    showTitle: boolean;
    name: string;
    serviceUrl: string;
    pageTitle: string;
    backLink: {
        href: string;
    };
    errors: {
        text: string;
        href: string;
    }[] | undefined;
    fields: {
        postcodeQuery: {
            id: string;
            name: string;
            label: {
                text: string;
            };
            hint: {
                text: string;
            };
            value: string | undefined;
            errorMessage: {
                text: string;
            } | undefined;
        };
        buildingNameQuery: {
            id: string;
            name: string;
            label: {
                text: string;
            };
            hint: {
                text: string;
            };
            value: string | undefined;
            errorMessage: {
                text: string;
            } | undefined;
        };
    };
    buttons: {
        continueButton: {
            text: string;
            classes: string;
        };
        manualLink: {
            text: string;
            href: string;
        };
    };
};
/**
 * The postcode lookup select form view model
 * @param {{ session: PostcodeLookupSessionData, apiKey: string }} data
 * @param {PostcodeLookupSelectPayload} [payload]
 * @param {Error} [err]
 */
export function selectViewModel(data: {
    session: PostcodeLookupSessionData;
    apiKey: string;
}, payload?: PostcodeLookupSelectPayload, err?: Error): Promise<{
    step: string;
    showTitle: boolean;
    name: string;
    serviceUrl: string;
    pageTitle: string;
    backLink: {
        href: string;
    };
    errors: {
        text: string;
        href: string;
    }[] | undefined;
    searchAgainLink: {
        text: string;
        href: string;
    };
    fields: {
        postcodeQuery: {
            id: string;
            name: string;
            type: string;
            value: string;
        };
        buildingNameQuery: {
            id: string;
            name: string;
            type: string;
            value: string;
        };
        uprn: {
            id: string;
            name: string;
            label: {
                text: string;
            } | undefined;
            value: string | undefined;
            errorMessage: {
                text: string;
            } | undefined;
            items: {
                text: string;
                value: string;
            }[] | undefined;
            type: string | undefined;
        };
    };
    details: PostcodeLookupDetailsData;
    addressCount: number;
    singleAddress: Address | undefined;
    hasAddresses: boolean;
    hasMultipleAddresses: boolean;
    buttons: {
        continueButton: {
            href: string | undefined;
            text: string;
            classes: string;
        };
        manualLink: {
            text: string;
            href: string;
        };
    };
}>;
/**
 * The postcode lookup manual form view model
 * @param {PostcodeLookupSessionData} data
 * @param {PostcodeLookupManualPayload} [payload]
 * @param {Error} [err]
 */
export function manualViewModel(data: PostcodeLookupSessionData, payload?: PostcodeLookupManualPayload, err?: Error): {
    step: string;
    showTitle: boolean;
    name: string;
    serviceUrl: string;
    pageTitle: string;
    backLink: {
        href: string;
    };
    errors: {
        text: string;
        href: string;
    }[] | undefined;
    hint: "" | {
        text: string;
    } | undefined;
    fields: {
        addressLine1: {
            id: string;
            name: string;
            label: {
                text: string;
            };
            value: string | undefined;
            errorMessage: {
                text: string;
            } | undefined;
        };
        addressLine2: {
            id: string;
            name: string;
            label: {
                text: string;
            };
            value: string | undefined;
            errorMessage: {
                text: string;
            } | undefined;
        };
        town: {
            id: string;
            name: string;
            label: {
                text: string;
            };
            classes: string;
            value: string | undefined;
            errorMessage: {
                text: string;
            } | undefined;
        };
        county: {
            id: string;
            name: string;
            label: {
                text: string;
            };
            value: string | undefined;
            errorMessage: {
                text: string;
            } | undefined;
        };
        postcode: {
            id: string;
            name: string;
            label: {
                text: string;
            };
            classes: string;
            value: string | undefined;
            errorMessage: {
                text: string;
            } | undefined;
        };
    };
    buttons: {
        continueButton: {
            text: string;
            classes: string;
        };
        detailsLink: {
            text: string;
            href: string;
        };
    };
};
export namespace steps {
    let details: string;
    let select: string;
    let manual: string;
}
export const JOURNEY_BASE_URL: "/postcode-lookup";
export const stepSchema: Joi.StringSchema<string>;
/**
 * Postcode lookup details form payload schema
 * @type {ObjectSchema<PostcodeLookupDetailsPayload>}
 */
export const detailsPayloadSchema: Joi.ObjectSchema<PostcodeLookupDetailsPayload>;
/**
 * Postcode lookup select form payload schema
 * @type {ObjectSchema<PostcodeLookupSelectPayload>}
 */
export const selectPayloadSchema: Joi.ObjectSchema<PostcodeLookupSelectPayload>;
/**
 * Postcode lookup manual form payload schema
 * @type {ObjectSchema<PostcodeLookupManualPayload>}
 */
export const manualPayloadSchema: Joi.ObjectSchema<PostcodeLookupManualPayload>;
export type OptionalValidationErrorItem = Joi.ValidationErrorItem | undefined;
import type { PostcodeLookupSessionData } from '~/src/server/plugins/postcode-lookup/types.js';
import type { PostcodeLookupDetailsData } from '~/src/server/plugins/postcode-lookup/types.js';
import type { PostcodeLookupSelectPayload } from '~/src/server/plugins/postcode-lookup/types.js';
import type { Address } from '~/src/server/plugins/postcode-lookup/types.js';
import type { PostcodeLookupManualPayload } from '~/src/server/plugins/postcode-lookup/types.js';
import Joi from 'joi';
import type { PostcodeLookupDetailsPayload } from '~/src/server/plugins/postcode-lookup/types.js';
