import { FieldErrors, FieldError, FieldPath, FieldValues } from 'react-hook-form'; import { FormErrorParserFn } from '../../context'; import * as React from 'react'; /** * Props for the `useComposeHelperText` hook. */ export type UseComposeHelperTextProps = { /** * Flag to determine whether to compose helper text based on error state. */ composeHelperText?: boolean; /** * Custom error parser function for formatting error messages. * If not provided, the default error parser is used. */ errorParser?: FormErrorParserFn; /** * Error object from form validation that may contain error details. */ fieldError?: FieldError | FieldErrors; /** * The helper text to be displayed when there is no error message. */ helperText?: React.ReactNode; /** * Name of the field */ name?: FieldPath | FieldPath[] | readonly FieldPath[]; }; /** * A custom hook that determines the appropriate helper text to display based on error states and context. * * @param props - The properties for composing the helper text. * @returns The composed helper text or error message based on the current state. */ export declare function useUnstableComposeHelperText(props: UseComposeHelperTextProps): React.ReactNode;