import { Ionicons } from "@expo/vector-icons"; import React from "react"; import { Animated, Pressable, StyleSheet, View } from "react-native"; import { Text } from "@/components/common/Text"; import { TVTypography } from "@/constants/TVTypography"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; export interface TVTrackCardProps { label: string; sublabel?: string; selected: boolean; hasTVPreferredFocus?: boolean; onPress: () => void; } export const TVTrackCard = React.forwardRef( ({ label, sublabel, selected, hasTVPreferredFocus, onPress }, ref) => { const { focused, handleFocus, handleBlur, animatedStyle } = useTVFocusAnimation({ scaleAmount: 1.05 }); return ( {label} {sublabel && ( {sublabel} )} {selected && !focused && ( )} ); }, ); const styles = StyleSheet.create({ trackCard: { width: 180, height: 80, borderRadius: 14, justifyContent: "center", alignItems: "center", paddingHorizontal: 12, }, trackCardText: { fontSize: TVTypography.callout, textAlign: "center", }, trackCardSublabel: { fontSize: TVTypography.callout, marginTop: 2, }, checkmark: { position: "absolute", top: 8, right: 8, }, });