import React from "react";
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
/**
 * Value used for {@link FormItemContext}
 *
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 */
export interface FormItemContextValue {
    id: string;
}
interface FormLabelProps {
    className?: string;
    children?: React.ReactNode;
    ref?: React.Ref<HTMLLabelElement>;
}
interface FormMessageProps {
    children?: React.ReactNode;
    className?: string;
    ref?: React.Ref<HTMLParagraphElement>;
}
interface FormControlProps {
    children?: React.ReactElement<React.ComponentPropsWithoutRef<"input">>;
    ref?: React.Ref<HTMLInputElement>;
}
interface FormDescriptionProps {
    children?: React.ReactNode;
    className?: string;
    ref?: React.Ref<HTMLParagraphElement>;
}
interface FormItemProps {
    className?: string;
    children?: React.ReactNode;
    ref?: React.Ref<HTMLDivElement>;
}
/**
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 */
export declare const FormItemContext: React.Context<FormItemContextValue>;
/**
 * Main form component that serves as a wrapper for react-hook-form's FormProvider
 *
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 *
 * @example
 * ```tsx
 * function MyComponent() {
 *   const form = useForm();
 *
 *   return (
 *     <Form {...form}>
 *          <input {...form.register("email")} />
 *     </Form>
 *   );
 * }
 * ```
 */
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
/**
 * Component that wraps Controller and provides field name context to connect form elements with react-hook-form
 *
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 *
 * @example
 * ```tsx
 * function MyComponent() {
 *     const form = useForm({...});
 *
 *     return (
 *         <FormField control={form.control} name="email" render={...}/>
 *     );
 * }
 * ```
 */
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, render, disabled, control, rules, defaultValue, shouldUnregister, }: ControllerProps<TFieldValues, TName> & {
    name: string;
}): React.JSX.Element;
/**
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 */
declare function useFormField(): {
    invalid: boolean;
    isDirty: boolean;
    isTouched: boolean;
    isValidating: boolean;
    error?: import("react-hook-form").FieldError;
    id: string;
    name: string;
    formItemId: string;
    formDescriptionId: string;
    formMessageId: string;
};
/**
 * UI container that generates and shares unique ID for label-input connections and accessibility
 *
 * {@link FormItem}
 *
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 */
declare function FormItem({ className, children, ref }: FormItemProps): React.JSX.Element;
declare namespace FormItem {
    var displayName: string;
}
/**
 * Label component that automatically connects to form inputs using IDs from FormItem context
 *
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 */
declare function FormLabel({ className, children, ref }: FormLabelProps): React.JSX.Element;
declare namespace FormLabel {
    var displayName: string;
}
/**
 * Control component that applies accessibility attributes to child elements using context IDs
 *
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 */
declare function FormControl({ ref, children }: FormControlProps): React.JSX.Element;
declare namespace FormControl {
    var displayName: string;
}
/**
 * Description component that uses a shared ID from context
 *
 * {@link FormDescription}
 *
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 */
declare function FormDescription({ className, children, ref }: FormDescriptionProps): React.JSX.Element;
declare namespace FormDescription {
    var displayName: string;
}
/**
 * Error message component that displays validation errors or custom messages
 *
 * {@link FormMessage}
 *
 * Based on {@link https:/ui.shadcn.com/docs/components/form Form}
 */
declare function FormMessage({ className, children, ref }: FormMessageProps): React.JSX.Element;
declare namespace FormMessage {
    var displayName: string;
}
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
