import { type LitElement } from '../../../../external/lit/index.js';
import type { HTMLElementConstructor } from '../../../../libs/extension-api/index.js';
type UmbNativeFormControlElement = Pick<HTMLObjectElement, 'validity' | 'checkValidity' | 'validationMessage' | 'setCustomValidity'> & HTMLElement;
type FlagTypes = 'customError' | 'badInput' | 'patternMismatch' | 'rangeOverflow' | 'rangeUnderflow' | 'stepMismatch' | 'tooLong' | 'tooShort' | 'typeMismatch' | 'valueMissing' | 'valid';
export interface UmbFormControlValidatorConfig {
    flagKey: FlagTypes;
    getMessageMethod: () => string;
    checkMethod: () => boolean;
    weight: number;
}
export interface UmbFormControlMixinInterface<ValueType> extends HTMLElement {
    addValidator: (flagKey: FlagTypes, getMessageMethod: () => string, checkMethod: () => boolean) => UmbFormControlValidatorConfig;
    removeValidator: (obj: UmbFormControlValidatorConfig) => void;
    focusFirstInvalidElement(): void;
    get value(): ValueType;
    set value(newValue: ValueType);
    formResetCallback(): void;
    checkValidity(): boolean;
    get validationMessage(): string;
    get validity(): ValidityState;
    setCustomValidity(error?: string): void;
    submit(): void;
    pristine: boolean;
}
export declare abstract class UmbFormControlMixinElement<ValueType> extends LitElement implements UmbFormControlMixinInterface<ValueType> {
    protected _internals: ElementInternals;
    protected _runValidators(): void;
    addValidator: (flagKey: FlagTypes, getMessageMethod: () => string, checkMethod: () => boolean) => UmbFormControlValidatorConfig;
    removeValidator: (obj: UmbFormControlValidatorConfig) => void;
    protected addFormControlElement(element: UmbNativeFormControlElement): void;
    protected removeFormControlElement(element: UmbNativeFormControlElement): void;
    protected getFormElement(): HTMLElement | undefined | null;
    focusFirstInvalidElement(): void;
    get value(): ValueType;
    set value(newValue: ValueType);
    formResetCallback(): void;
    checkValidity(): boolean;
    get validationMessage(): string;
    get validity(): ValidityState;
    setCustomValidity(error?: string): void;
    submit(): void;
    pristine: boolean;
}
/**
 * @mixin
 * The mixin allows a custom element to participate in HTML forms.
 * @param {object} superClass - superclass to be extended.
 * @param {object} defaultValue - Default value for the form control.
 * @returns {Function} - The mixin class.
 */
export declare function UmbFormControlMixin<ValueType = FormData | FormDataEntryValue, T extends HTMLElementConstructor<LitElement> = HTMLElementConstructor<LitElement>, DefaultValueType = undefined>(superClass: T, defaultValue?: DefaultValueType): HTMLElementConstructor<UmbFormControlMixinElement<ValueType | DefaultValueType>> & T;
export {};
