import type { BaseFieldConfig } from './field-config.js'; import type { FieldValidationResult } from './field-controller.js'; import type { ManagedFieldController } from './managed-field-controller.js'; type NativeControl = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement; /** * Adapter used to normalize one native control. */ export interface NativeControlAdapter { readonly control: NativeControl; readValue(signal?: AbortSignal): TValue | PromiseLike; writeValue(value: unknown): void; setReadOnly(isReadOnly: boolean): void; validateNative(): FieldValidationResult; destroy?(): void; } /** * Arguments shared by native control controller construction. */ export interface NativeControlControllerArguments { readonly config: BaseFieldConfig & { readonly label?: string; readonly description?: string; readonly readOnly?: boolean; readonly required?: boolean; }; readonly fieldId: string; readonly adapter: NativeControlAdapter; readonly invalidMessage: string; readonly requiredMessage: string; readonly onUserChange: () => void; readonly changeEvent?: 'change' | 'input'; readonly controlContainer?: HTMLElement; readonly labelPlacement?: 'before-control' | 'after-control'; } /** * Creates lifecycle, error, callback, and DOM behavior around a native control. * * @param controllerArguments - Typed construction arguments. * @returns An internal type-erased controller. */ export declare function createNativeControlController(controllerArguments: NativeControlControllerArguments): ManagedFieldController; export {};