import { type NumberFieldComponent } from '@defra/forms-model'; import joi, { type NumberSchema } 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'; export declare class NumberField extends FormComponent { options: NumberFieldComponent['options']; schema: NumberFieldComponent['schema']; formSchema: NumberSchema; stateSchema: NumberSchema; constructor(def: NumberFieldComponent, props: ConstructorParameters[1]); getFormValueFromState(state: FormSubmissionState): number | undefined; getFormValue(value?: FormStateValue | FormState): number | undefined; getViewModel(payload: FormPayload, errors?: FormSubmissionError[]): { attributes: { autocomplete?: string; maxlength?: number; multiple?: string; accept?: string; inputmode?: string; }; prefix: import("./types.js").ComponentText | undefined; suffix: import("./types.js").ComponentText | undefined; value: string | number | boolean | undefined; label: { text: string; }; id: string; name: string; type?: string; hint?: { id?: string; text: string; }; classes?: string; condition?: string; errors?: FormSubmissionError[]; errorMessage?: { text: string; }; summaryHtml?: string; html?: 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; legend?: import("./types.js").Label; }; formGroup?: { classes?: string; attributes?: string | Record; }; showFieldsetError?: boolean; components?: import("./types.js").ComponentViewModel[]; upload?: { count: number; summaryList: import("~/src/server/plugins/engine/types.js").SummaryList; }; }; isValue(value?: FormStateValue | FormState): value is number; /** * 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 isNumber(value?: FormStateValue | FormState): value is number; } export declare function getValidatorPrecision(component: NumberField): joi.CustomValidator;