import { Ionicons } from "@expo/vector-icons"; import type { FC } from "react"; import { Pressable, Animated as RNAnimated, StyleSheet, type View, } from "react-native"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; export interface TVControlButtonProps { icon: keyof typeof Ionicons.glyphMap; onPress: () => void; onLongPress?: () => void; onPressOut?: () => void; disabled?: boolean; hasTVPreferredFocus?: boolean; size?: number; delayLongPress?: number; /** Callback ref setter for focus guide destination pattern */ refSetter?: (ref: View | null) => void; } export const TVControlButton: FC = ({ icon, onPress, onLongPress, onPressOut, disabled, hasTVPreferredFocus, size = 32, delayLongPress = 300, refSetter, }) => { const { focused, handleFocus, handleBlur, animatedStyle } = useTVFocusAnimation({ scaleAmount: 1.15, duration: 120 }); return ( ); }; const styles = StyleSheet.create({ button: { width: 64, height: 64, borderRadius: 32, borderWidth: 2, justifyContent: "center", alignItems: "center", }, });