import { type MonthYearFieldComponent } from '@defra/forms-model'; import { type CustomValidator, type ObjectSchema } from 'joi'; import { ComponentCollection } from '~/src/server/plugins/engine/components/ComponentCollection.js'; import { FormComponent } from '~/src/server/plugins/engine/components/FormComponent.js'; import { type DateInputItem, type MonthYearState } from '~/src/server/plugins/engine/components/types.js'; import { type ErrorMessageTemplateList, type FormPayload, type FormState, type FormStateValue, type FormSubmissionError, type FormSubmissionState } from '~/src/server/plugins/engine/types.js'; export declare class MonthYearField extends FormComponent { options: MonthYearFieldComponent['options']; formSchema: ObjectSchema; stateSchema: ObjectSchema; collection: ComponentCollection; constructor(def: MonthYearFieldComponent, props: ConstructorParameters[1]); getFormValueFromState(state: FormSubmissionState): MonthYearState | undefined; getDisplayStringFromFormValue(value: MonthYearState | undefined): string; getDisplayStringFromState(state: FormSubmissionState): string; getContextValueFromFormValue(value: MonthYearState | undefined): string | null; getContextValueFromState(state: FormSubmissionState): string | null; getViewModel(payload: FormPayload, errors?: FormSubmissionError[]): { fieldset: { attributes?: string | Record; legend?: import("~/src/server/plugins/engine/components/types.js").Label; }; items: DateInputItem[]; 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("~/src/server/plugins/engine/components/types.js").ComponentText; suffix?: import("~/src/server/plugins/engine/components/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("~/src/server/plugins/engine/components/types.js").Content | import("~/src/server/plugins/engine/components/types.js").Content[] | string; maxlength?: number; maxwords?: number; rows?: number; formGroup?: { classes?: string; attributes?: string | Record; }; showFieldsetError?: boolean; components?: import("~/src/server/plugins/engine/components/types.js").ComponentViewModel[]; upload?: { count: number; summaryList: import("~/src/server/plugins/engine/types.js").SummaryList; }; }; isState(value?: FormStateValue | FormState): value is MonthYearState; /** * For error preview page that shows all possible errors on a component */ getAllPossibleErrors(): ErrorMessageTemplateList; /** * Static version of getAllPossibleErrors that doesn't require a component instance. */ static getAllPossibleErrors(): ErrorMessageTemplateList; static isMonthYear(value?: FormStateValue | FormState): value is MonthYearState; } export declare function getValidatorMonthYear(component: MonthYearField): CustomValidator;