import { ChangeEventHandler, ComponentPropsWithoutRef, ComponentType, } from 'react' import { FieldError, FieldPathValue, FieldValues, Path, UseFormRegister, UseFormSetValue, UseFormWatch, Validate, } from 'react-hook-form' import { Entity } from '../entity' import { StatefulEntityDisplayProps } from './EntityDisplay' export interface AddressInputProps< FV extends FieldValues = FieldValues, FieldName extends Path = Path, > extends Omit, 'required'> { fieldName?: FieldName register?: UseFormRegister watch?: UseFormWatch setValue?: UseFormSetValue onChange?: ChangeEventHandler validation?: Validate>[] error?: FieldError | string | boolean disabled?: boolean required?: boolean containerClassName?: string type?: 'wallet' | 'contract' EntityDisplay?: ComponentType autofillEntities?: { entities: Entity[] loading: boolean } /** * Optionally hide the entity from showing on the right. */ hideEntity?: boolean }