import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react_hook_form from 'react-hook-form';
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
export { Controller, FieldPath, FieldValues, FormProvider, SubmitErrorHandler, SubmitHandler, UseFormProps, UseFormReturn, useController, useForm, useFormContext, useFormState, useWatch } from 'react-hook-form';
import * as React from 'react';

/**
 * Form — RHF FormProvider wrapper.
 *
 * Spread the result of `useForm()` into <Form> so descendants can read the
 * form state via context. Renders no DOM of its own; consumers can place a
 * <form onSubmit={form.handleSubmit(...)}> inside.
 */
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
/**
 * FormField — connects a named field to RHF's Controller and provides
 * field-name context to the descendants (FormLabel, FormControl, FormMessage).
 */
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: ControllerProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
/**
 * useFormField — read-only access to the current field context.
 *
 * Returns the per-field id collection plus the live RHF error state. Useful
 * when building custom form controls that want the same wiring as FormControl.
 */
declare function useFormField(): {
    id: string;
    name: string;
    formItemId: string;
    formDescriptionId: string;
    formMessageId: string;
    error: {
        message?: string;
        type?: string;
    } | undefined;
    invalid: boolean;
};
declare const formItemVariants: (props?: ({
    [x: string]: string | undefined;
} & {
    className?: string;
}) | undefined) => string;
interface FormItemProps extends React.HTMLAttributes<HTMLDivElement> {
}
declare const FormItem: React.ForwardRefExoticComponent<FormItemProps & React.RefAttributes<HTMLDivElement>>;
declare const formLabelVariants: (props?: ({
    invalid?: "true" | "false" | undefined;
} & {
    className?: string;
}) | undefined) => string;
interface FormLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
}
declare const FormLabel: React.ForwardRefExoticComponent<FormLabelProps & React.RefAttributes<HTMLLabelElement>>;
interface FormControlProps extends React.HTMLAttributes<HTMLElement> {
    children?: React.ReactNode;
}
declare const FormControl: React.ForwardRefExoticComponent<FormControlProps & React.RefAttributes<HTMLElement>>;
interface FormDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
}
declare const FormDescription: React.ForwardRefExoticComponent<FormDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
interface FormMessageProps extends React.HTMLAttributes<HTMLParagraphElement> {
}
declare const FormMessage: React.ForwardRefExoticComponent<FormMessageProps & React.RefAttributes<HTMLParagraphElement>>;

/**
 * Minimal Slot implementation.
 *
 * Why not @radix-ui/react-slot? Per package policy, no external runtime deps
 * are allowed in @refraction-ui/* packages. This Slot does the small amount
 * of work we actually need:
 *   - Forwards a single React child
 *   - Merges incoming props onto that child (event handlers are chained,
 *     className is concatenated, style is shallow-merged)
 *   - Merges refs (callback refs and ref objects)
 *
 * It is intentionally simpler than Radix Slot — no <Slottable/>, no asChild
 * recursion. FormControl renders exactly one child input/textarea/etc., which
 * is all we need here.
 */
interface SlotProps extends React.HTMLAttributes<HTMLElement> {
    children?: React.ReactNode;
}
declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;

export { Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, Slot, type SlotProps, formItemVariants, formLabelVariants, useFormField };
