type FieldState = { dirty: boolean; disabled: boolean; errorVisible: boolean; filled: boolean; focused: boolean; submitted: boolean; touched: boolean; valid: boolean | null; validating: boolean; }; type FieldValidityKey = "badInput" | "customError" | "patternMismatch" | "rangeOverflow" | "rangeUnderflow" | "stepMismatch" | "tooLong" | "tooShort" | "typeMismatch" | "valueMissing"; type FieldValidationError = { readonly key: FieldValidityKey; readonly message: string; readonly source: "async" | "custom" | "external" | "native" | "schema" | "server"; }; type FieldFormValidationState = { readonly errors: FieldValidationError[]; readonly submitted: boolean; readonly validated: boolean; readonly validating?: boolean; readonly visible: boolean; }; type FieldFormRegistration = { readonly control?: HTMLElement; readonly disabled: boolean; focus(): void; readonly name?: string; readonly root: HTMLElement; readonly valid: boolean | null; readonly value: FormDataEntryValue | FormDataEntryValue[] | null; }; type FieldOptions = { dirty?: boolean; disabled?: boolean; invalid?: boolean; name?: string; touched?: boolean; }; type FieldInstance = { readonly root: HTMLElement; destroy(): void; getFormRegistration(): FieldFormRegistration; getState(): FieldState; refresh(): void; setDirty(dirty?: boolean): void; setDisabled(disabled: boolean): void; setFormValidationState(state?: FieldFormValidationState): void; setInvalid(invalid?: boolean): void; setName(name?: string): void; setTouched(touched?: boolean): void; }; declare function createField(root: HTMLElement, options?: FieldOptions): FieldInstance; export { type FieldFormRegistration, type FieldFormValidationState, type FieldInstance, type FieldOptions, type FieldState, type FieldValidationError, type FieldValidityKey, createField };