import { LitElement } from "lit"; export type FormState = string | File | FormData | null | string; export declare abstract class FormControlBase extends LitElement { /** Enables form-associated custom element behavior */ static formAssociated: boolean; protected internals: ElementInternals; protected defaultValue: string; /** Native form attributes you’ll reuse everywhere */ name: string; formId: string | null; disabled: boolean; readonly: boolean; required: boolean; requiredMessage: string; constructor(); get form(): HTMLFormElement | null; get validity(): ValidityState; get validationMessage(): string; get willValidate(): boolean; checkValidity(): boolean; reportValidity(): boolean; formResetCallback(): void; formDisabledCallback(disabled: boolean): void; formStateRestoreCallback(state: FormState): void; /** Must return current “submission value” (string/file/formdata) */ protected abstract getFormValue(): FormState; /** Must set the component state from restored state (usually string) */ protected abstract setValueFromFormState(state: FormState): void; /** Must return the internal focusable control to anchor validity bubbles */ protected abstract getValidityAnchor(): HTMLElement | undefined; /** Must return true if empty (for required) */ protected abstract isEmpty(): boolean; /** Must return the native control you want to proxy to (input/textarea/select/...) */ protected abstract getNativeControl(): HTMLElement | null; /** Optional: return first custom error message (or empty string) */ protected getCustomErrorMessage(): string; protected validateForForm(): string; /** Optional: reset component to default */ protected onFormReset(): void; /** Optional: react to fieldset disabled */ protected onFormDisabled(_disabled: boolean): void; /** Optional: handle BFCache restore */ protected onFormStateRestore(state: FormState): void; /** * Called by base after a proxy method mutates the native control. * Subclasses should pull native.value into their state and optionally validate. */ protected onNativeValueMutated(_native: any): void; protected syncFormValue(): void; protected syncValidity(): void; protected reemitNativeEvent(type: string, originalEvent: Event, init?: Partial & { detail?: any; }): void; /** Call once after initial render */ protected captureDefaultValue(initial: string): void; protected get nativeControl(): any | null; protected get nativeInput(): HTMLInputElement | null; protected get nativeTextarea(): HTMLTextAreaElement | null; /** Central sync after proxy calls */ protected syncFromNative(runValidity?: boolean): void; focus(options?: FocusOptions): void; blur(): void; click(): void; showPicker(): boolean; protected getSelectionTarget(): HTMLInputElement | HTMLTextAreaElement | null; get selectionStart(): number | null; set selectionStart(v: number | null); get selectionEnd(): number | null; set selectionEnd(v: number | null); get selectionDirection(): "forward" | "backward" | "none" | null; select(): void; setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void; setRangeText(replacement: string, start?: number, end?: number, selectionMode?: "select" | "start" | "end" | "preserve"): void; get valueAsNumber(): number; set valueAsNumber(v: number); get valueAsDate(): Date | null; set valueAsDate(v: Date | null); stepUp(n?: number): void; stepDown(n?: number): void; setCustomValidity(message: string): void; }