import type { RefCallback } from 'react'; import type { FieldValues, Path, UseFormRegisterReturn, } from 'react-hook-form'; import type { Options as MaskOptions } from './inputmask.types'; export type { UseFormRegister, UseFormRegisterReturn } from 'react-hook-form'; export type Mask = 'datetime' | 'email' | 'numeric' | 'currency' | 'decimal' | 'integer' | 'percentage' | 'url' | 'ip' | 'mac' | 'ssn' | 'brl-currency' | 'cpf' | 'cnpj' | 'br-bank-account' | 'br-bank-agency' | (string & {}) | (string[] & {}) | null; export type Options = MaskOptions; export type Input = HTMLInputElement | HTMLTextAreaElement | HTMLElement; export interface UnmaskedValueApi { unmaskedValue: () => string; } export type UseMaskInputReturn = RefCallback & UnmaskedValueApi; export interface UseHookFormMaskReturn< T extends FieldValues, > extends UseFormRegisterReturn>, UnmaskedValueApi { ref: RefCallback; prevRef: RefCallback; } export interface TanStackFormInputProps { name?: string; ref?: RefCallback; [key: string]: unknown; } export type UseTanStackFormMaskReturn = Omit & { ref: RefCallback; prevRef: RefCallback | undefined; } & UnmaskedValueApi;