import { type FormComponentsDef } from '@defra/forms-model';
import joi, { type LanguageMessages, type StringSchema } from 'joi';
import { FormComponent } from '~/src/server/plugins/engine/components/FormComponent.js';
import { type ErrorMessageTemplateList, type FormPayload, type FormState, type FormStateValue, type FormSubmissionError, type FormSubmissionState } from '~/src/server/plugins/engine/types.js';
interface LocationFieldOptions {
    instructionText?: string;
    required?: boolean;
    customValidationMessage?: string;
    customValidationMessages?: LanguageMessages;
    classes?: string;
}
interface ValidationConfig {
    pattern: RegExp;
    patternErrorMessage: string;
    customValidation?: (value: string, helpers: joi.CustomHelpers) => string | joi.ErrorReport;
    additionalMessages?: LanguageMessages;
}
/**
 * Abstract base class for location-based field components
 */
export declare abstract class LocationFieldBase extends FormComponent {
    options: LocationFieldOptions;
    formSchema: StringSchema;
    stateSchema: StringSchema;
    instructionText?: string;
    protected abstract getValidationConfig(): ValidationConfig;
    protected abstract getErrorTemplates(): {
        type: string;
        template: string;
    }[];
    constructor(def: FormComponentsDef, props: ConstructorParameters<typeof FormComponent>[1]);
    getFormValueFromState(state: FormSubmissionState): string | undefined;
    getFormValue(value?: FormStateValue | FormState): string | undefined;
    isValue(value?: FormStateValue | FormState): value is string;
    getViewModel(payload: FormPayload, errors?: FormSubmissionError[]): {
        label: {
            text: string;
        };
        id: string;
        name: string;
        value: import("~/src/server/plugins/engine/types.js").FormValue;
        type?: string;
        hint?: {
            id?: string;
            text: string;
        };
        prefix?: import("./types.js").ComponentText;
        suffix?: import("./types.js").ComponentText;
        classes?: string;
        condition?: string;
        errors?: FormSubmissionError[];
        errorMessage?: {
            text: string;
        };
        summaryHtml?: string;
        html?: string;
        attributes: {
            autocomplete?: string;
            maxlength?: number;
            multiple?: string;
            accept?: string;
            inputmode?: string;
        };
        content?: import("./types.js").Content | import("./types.js").Content[] | string;
        maxlength?: number;
        maxwords?: number;
        rows?: number;
        items?: import("./types.js").ListItem[] | import("./types.js").DateInputItem[];
        fieldset?: {
            attributes?: string | Record<string, string>;
            legend?: import("./types.js").Label;
        };
        formGroup?: {
            classes?: string;
            attributes?: string | Record<string, string>;
        };
        components?: import("./types.js").ComponentViewModel[];
        upload?: {
            count: number;
            summaryList: import("~/src/server/plugins/engine/types.js").SummaryList;
        };
    } | {
        instructionText: string;
        label: {
            text: string;
        };
        id: string;
        name: string;
        value: import("~/src/server/plugins/engine/types.js").FormValue;
        type?: string;
        hint?: {
            id?: string;
            text: string;
        };
        prefix?: import("./types.js").ComponentText;
        suffix?: import("./types.js").ComponentText;
        classes?: string;
        condition?: string;
        errors?: FormSubmissionError[];
        errorMessage?: {
            text: string;
        };
        summaryHtml?: string;
        html?: string;
        attributes: {
            autocomplete?: string;
            maxlength?: number;
            multiple?: string;
            accept?: string;
            inputmode?: string;
        };
        content?: import("./types.js").Content | import("./types.js").Content[] | string;
        maxlength?: number;
        maxwords?: number;
        rows?: number;
        items?: import("./types.js").ListItem[] | import("./types.js").DateInputItem[];
        fieldset?: {
            attributes?: string | Record<string, string>;
            legend?: import("./types.js").Label;
        };
        formGroup?: {
            classes?: string;
            attributes?: string | Record<string, string>;
        };
        components?: import("./types.js").ComponentViewModel[];
        upload?: {
            count: number;
            summaryList: import("~/src/server/plugins/engine/types.js").SummaryList;
        };
    };
    getAllPossibleErrors(): ErrorMessageTemplateList;
    static isText(value?: FormStateValue | FormState): value is string;
}
export {};
