import React from "react"; import { Animated, Pressable, View } from "react-native"; import { Text } from "@/components/common/Text"; import { useScaledTVTypography } from "@/constants/TVTypography"; import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation"; export interface TVSettingsToggleProps { label: string; value: boolean; onToggle: (value: boolean) => void; isFirst?: boolean; disabled?: boolean; } export const TVSettingsToggle: React.FC = ({ label, value, onToggle, isFirst, disabled, }) => { const typography = useScaledTVTypography(); const { focused, handleFocus, handleBlur, animatedStyle } = useTVFocusAnimation({ scaleAmount: 1.02 }); return ( onToggle(!value)} onFocus={handleFocus} onBlur={handleBlur} hasTVPreferredFocus={isFirst && !disabled} disabled={disabled} focusable={!disabled} > {label} ); };