import * as react_jsx_runtime from 'react/jsx-runtime';
import { HTMLAttributes, ReactNode } from 'react';
import { BagFunction } from '../../utils/bagFunctions.js';
import { LabelProps } from '../user-action/Label.js';

type ErrorShowBehaviour = 'always' | 'whenTouched';
type FormElementHTMLProperties = Pick<HTMLAttributes<HTMLElement>, 'id' | 'aria-labelledby' | 'aria-describedby' | 'aria-disabled' | 'aria-invalid' | 'aria-errormessage' | 'aria-required'>;
type FormElementStateProperties = {
    invalid: boolean;
    disabled: boolean;
};
type FormElementWrapperBag = FormElementHTMLProperties & FormElementStateProperties & {
    required: boolean;
    isShowingError: boolean;
    setIsShowingError: (isShowingError?: boolean) => void;
};
type FormElementWrapperProps = {
    children: BagFunction<FormElementWrapperBag>;
    id?: string;
    required?: boolean;
    disabled?: boolean;
    isShowingError?: boolean;
    onIsShowingError?: (isTouched: boolean) => void;
    label?: ReactNode;
    labelProps?: Omit<LabelProps, 'children'>;
    errorShowBehaviour?: ErrorShowBehaviour;
    error?: ReactNode;
    errorProps?: Omit<HTMLAttributes<HTMLParagraphElement>, 'children'>;
    description?: ReactNode;
    descriptionProps?: Omit<HTMLAttributes<HTMLParagraphElement>, 'children'>;
    containerClassName?: string;
};
declare const FormElementWrapper: ({ children, id, required, disabled, isShowingError: initialIsShowingError, onIsShowingError, label, labelProps, errorShowBehaviour, error, errorProps, description, descriptionProps, containerClassName, }: FormElementWrapperProps) => react_jsx_runtime.JSX.Element;

export { type FormElementStateProperties, FormElementWrapper, type FormElementWrapperProps };
