/**
 * React Hook Form (RHF) backend implementation
 *
 * Wraps a react-hook-form instance to provide the unified FormBackend interface.
 * Validation is handled by the resolver passed to useForm (e.g., zodResolver).
 *
 * ## Why `as never` casts are used
 *
 * React Hook Form is heavily typed around its generic parameter, so methods like
 * `setValue<TFieldName>(path: TFieldName, value: TFieldValues[TFieldName])` require
 * compile-time knowledge of the exact form schema.
 *
 * Our FormBackend interface is library-agnostic and uses dynamic string paths
 * (e.g., `"author.name"`, `"items.0.title"`) that can't be statically typed.
 * TypeScript's `keyof T` doesn't work with nested dot-notation paths.
 *
 * The `as never` cast is the safest way to bypass this:
 * - `never` is the bottom type, so casting TO `never` is always allowed
 * - It makes the intent explicit: "we're deliberately bypassing type checking here"
 * - It's more honest than using `any`, which could mask real errors
 *
 * Type safety is maintained at the widget layer, where components know their
 * specific field types and cast immediately after reading values.
 */
import type { FieldValues, UseFormReturn } from 'react-hook-form';
import type { FormBackend } from './types';
/**
 * Create RHF backend from react-hook-form instance
 *
 * Note: RHF handles validation through its resolver (passed to useForm).
 * The schema is integrated at form creation time, so we don't need it here.
 */
export declare function createRHFBackend<TFieldValues extends FieldValues>(form: UseFormReturn<TFieldValues>): FormBackend;
export declare function createRHFBackend(form: UseFormReturn<FieldValues>): FormBackend;
