import { type ObjectAsyncGuard, type ObjectGuard } from '@astral/validations';
import { type FieldValues, type Resolver } from 'react-hook-form';
/**
 * Позволяет выполнять object или objectAsync валидацию для формы react-hook-form
 * @param validateBySchema
 * @example
 * ```tsx
 *      type Values = { info: { name: string } };
 *
 *     const validationSchema = object<Values>({
 *       info: object<Values['info']>({
 *         name: string(),
 *       }),
 *     });
 *
 *     const TestForm = () => {
 *       const { register, handleSubmit, formState } = useForm<Values>({
 *         resolver: resolver<Values>(validationSchema),
 *       });
 *
 *       return (
 *         <form onSubmit={handleSubmit(() => {})}>
 *           <input {...register('info.name')} />
 *           {formState.errors.info?.name && (
 *             <>
 *               <p>{formState.errors.info.name.message}</p>
 *               <p>{formState.errors.info.name.type}</p>
 *             </>
 *           )}
 *           <button type="submit">submit</button>
 *         </form>
 *       );
 *     };
 * ```
 */
export declare const resolver: <TFieldValues extends FieldValues = FieldValues>(validateBySchema: ObjectGuard<TFieldValues> | ObjectAsyncGuard<TFieldValues>) => Resolver<TFieldValues>;
