import { Animated, Pressable, View, type StyleProp, type ViewStyle } from 'react-native'; import { Text } from '../../components/wui-text'; import useAnimatedValue from '../../hooks/useAnimatedValue'; import { useTheme } from '../../hooks/useTheme'; import type { IconType, TagType } from '../../utils/TypesUtil'; import { Tag } from '../wui-tag'; import { WalletImage } from '../wui-wallet-image'; import { Icon } from '../../components/wui-icon'; import styles from './styles'; import { IconBox } from '../wui-icon-box'; const AnimatedPressable = Animated.createAnimatedComponent(Pressable); export interface ListWalletProps { name: string; onPress?: () => void; imageSrc?: string; imageHeaders?: Record; showAllWallets?: boolean; tagLabel?: string; tagVariant?: TagType; icon?: IconType; disabled?: boolean; installed?: boolean; style?: StyleProp; testID?: string; } export function ListWallet({ name, onPress, imageSrc, imageHeaders, showAllWallets, tagLabel, tagVariant, icon, disabled, installed, style, testID }: ListWalletProps) { const Theme = useTheme(); const { animatedValue, setStartValue, setEndValue } = useAnimatedValue( Theme['gray-glass-002'], Theme['gray-glass-010'] ); const templateInstalled = () => { if (!installed) return null; return ( ); }; function imageTemplate() { return ( {templateInstalled()} ); } function iconTemplate() { if (tagLabel && tagVariant) { return ( {tagLabel} ); } if (icon) { return ( ); } return null; } return ( {imageTemplate()} {name} {iconTemplate()} ); }