import { Dispatch, SetStateAction } from 'react';
export declare type FieldState = 'invalid' | 'valid' | undefined;
export interface FormControlBaseProps {
    /** Add to mark an error in the control */
    error: boolean;
    /** Add to mark the control as disabled */
    disabled: boolean;
    /** Add to mark as required */
    required: boolean | undefined;
    /** Add to mark input as valid */
    valid: boolean;
}
export interface UseFormControlProps extends Partial<FormControlBaseProps> {
    /** supply a static id for the control */
    id?: string;
}
export interface FormControlState extends FormControlBaseProps {
    formControlId: string;
    state: FieldState;
}
export declare const DEFAULT_FORM_STATE: FormControlState;
export declare const FormControlContext: import("react").Context<[FormControlState, Dispatch<SetStateAction<FormControlState>>] | undefined>;
/**
 * To be use within the supported FormControls (e.g. Input, TextArea, Select, Checkbox, Radio) or in you own form controls.
 * @param the control props
 * @returns [string, FormControlState]  the id to use in the control and form state derived from the props.
 */
export declare function useFormControl<Props extends UseFormControlProps>({ id: providedId, disabled, required, error, valid, ...props }: Props): [
    string,
    FormControlState,
    Omit<Props, 'id' | keyof FormControlBaseProps>
];
/**
 * For use in components that can be used outside the FormControl component.
 */
export declare function usePossibleFormControlState(): FormControlState | undefined;
/**
 * For use in internal FormControl components to get the current form control state.
 */
export declare function useFormControlState(): FormControlState;
