import { type FormId, type FieldName } from '@conform-to/dom'; import { useEffect } from 'react'; import { type FormMetadata, type FieldMetadata, type Pretty, type FormOptions } from './context'; /** * useLayoutEffect is client-only. * This basically makes it a no-op on server */ export declare const useSafeLayoutEffect: typeof useEffect; export declare function useFormId, FormError>(preferredId?: string): FormId; export declare function useNoValidate(defaultNoValidate?: boolean): boolean; export declare function useForm, FormValue = Schema, FormError = string[]>(options: Pretty, 'formId'> & { /** * The form id. If not provided, a random id will be generated. */ id?: string; /** * Enable constraint validation before the dom is hydated. * * Default to `true`. */ defaultNoValidate?: boolean; }>): [ FormMetadata, ReturnType['getFieldset']> ]; export declare function useFormMetadata, FormError = string[]>(formId?: FormId, options?: { defaultNoValidate?: boolean; }): FormMetadata; export declare function useField = any, FormError = string[]>(name: FieldName, options?: { formId?: FormId; }): [ FieldMetadata, FormMetadata ]; //# sourceMappingURL=hooks.d.ts.map