import { Ionicons } from "@expo/vector-icons"; import { Image } from "expo-image"; import React from "react"; import { Animated, Platform, Pressable, View } from "react-native"; import { Text } from "@/components/common/Text"; import { useScaledTVTypography } from "@/constants/TVTypography"; import { GlassPosterView, isGlassEffectAvailable, } from "@/modules/glass-poster"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; export interface TVSeriesSeasonCardProps { title: string; subtitle?: string; imageUrl: string | null; onPress: () => void; hasTVPreferredFocus?: boolean; } export const TVSeriesSeasonCard: React.FC = ({ title, subtitle, imageUrl, onPress, hasTVPreferredFocus, }) => { const typography = useScaledTVTypography(); const { focused, handleFocus, handleBlur, animatedStyle } = useTVFocusAnimation({ scaleAmount: 1.05 }); // Check if glass effect is available (tvOS 26+) const useGlass = Platform.OS === "ios" && isGlassEffectAvailable(); const renderPoster = () => { if (useGlass) { return ( ); } return ( {imageUrl ? ( ) : ( )} ); }; return ( {renderPoster()} {title} {subtitle && ( {subtitle} )} ); };