import type { ComponentChildren, GenericEventHandler, JSX, TargetedFocusEvent } from 'preact';
import type { Translatable } from '../../../../../types';
export type FieldErrorMessage = Translatable | boolean;
export interface FieldChildProps {
    'aria-describedby': string;
    'aria-labelledby': string;
    isInvalid: boolean;
    isValid: boolean;
    onBlurHandler?: (event: TargetedFocusEvent<HTMLInputElement>) => void;
    onFocusHandler?: (event: TargetedFocusEvent<HTMLInputElement>) => void;
    id: string;
}
export interface FieldProps {
    children: (props: FieldChildProps) => ComponentChildren;
    className?: string;
    disabled?: boolean;
    optional?: boolean;
    errorMessage?: FieldErrorMessage;
    formatGuidance?: string | JSX.Element | null;
    filled?: boolean;
    helper?: string | JSX.Element;
    isValid?: boolean;
    label?: string;
    name: string;
    onBlur?: GenericEventHandler<EventTarget>;
    onFieldBlur?: GenericEventHandler<EventTarget>;
    onFocus?: GenericEventHandler<EventTarget>;
    showErrorIconBottom?: boolean;
    showErrorIcon?: boolean;
    el?: 'div' | 'fieldset';
    helperPosition?: 'above' | 'below';
    /** @deprecated remove, use a11y-tests, this is a bad solution to an even worse problem  */
    dataTestId?: string;
}
