import { useState } from 'react'; import { TextInput } from 'react-native'; import { FlexView, useTheme } from '@reown/appkit-ui-react-native'; import { SendController } from '@reown/appkit-core-react-native'; import { useDebounceCallback } from '../../hooks/useDebounceCallback'; import styles from './styles'; export interface SendInputAddressProps { value?: string; } export function SendInputAddress({ value }: SendInputAddressProps) { const Theme = useTheme(); const [inputValue, setInputValue] = useState(value); const onSearch = async (search: string) => { SendController.setReceiverAddress(search); SendController.setReceiverProfileName(undefined); SendController.setReceiverProfileImageUrl(undefined); }; const { debouncedCallback: onDebounceSearch } = useDebounceCallback({ callback: onSearch, delay: 800 }); const onInputChange = (address: string) => { setInputValue(address); SendController.setReceiverAddress(address); onDebounceSearch(address); }; return ( ); }