import React from 'react';
import { FormLabelProps } from '../FormLabel/FormLabel';
declare type PassedOnFormLabelProps = Omit<FormLabelProps, 'children' | 'className' | 'component' | 'fieldId'>;
/**
 * This is the set of public-facing props that each component that uses `useFormLabel`
 * can include in its own props definition.
 */
export interface FormFieldProps extends PassedOnFormLabelProps {
    /**
     * Additional classes to be added to the root element.
     */
    className?: string;
    /**
     * Location of the error message relative to the field input
     */
    errorPlacement?: 'top' | 'bottom';
    /**
     * Label for the field.
     */
    label: React.ReactNode;
    /**
     * Additional classes to be added to the field label
     */
    labelClassName?: string;
    /**
     * A unique `id` to be used on the field label. If one isn't provided, a unique ID
     * will be generated.
     */
    labelId?: string;
}
/**
 * This is the full list of props accepted by `useFormLabel`. Components that use
 * `useFormLabel` should not include this entire set in their props but instead use
 * `FormFieldProps`, which is the set of public-facing props that a component can
 * include in its own props.
 */
export interface UseFormLabelProps extends FormFieldProps {
    /**
     * The root HTML element used to render the field label
     */
    labelComponent: 'label' | 'legend';
    /**
     *
     */
    wrapperIsFieldset: boolean;
}
/**
 * Takes a component's props and generates the props for its label, field,
 */
export declare function useFormLabel<T extends UseFormLabelProps>(props: T): {
    labelProps: {
        children: JSX.Element;
        className: string;
        component: "label" | "legend";
        errorMessage: React.ReactNode;
        errorMessageClassName: string;
        errorId: string;
        fieldId: string;
        hint: React.ReactNode;
        id: string;
        requirementLabel: React.ReactNode;
        inversed: boolean;
    };
    fieldProps: Omit<T, "label" | "hint" | "className" | "inversed" | "errorMessage" | "errorPlacement" | "errorMessageClassName" | "requirementLabel" | "labelClassName" | "labelComponent" | "wrapperIsFieldset"> & {
        id: string;
        errorId: string;
        errorMessage: React.ReactNode;
        errorPlacement: "top" | "bottom";
        inversed: boolean;
    };
    wrapperProps: {
        className: any;
        'aria-invalid': boolean;
    };
    bottomError: JSX.Element;
};
export default useFormLabel;
