import { Platform, TouchableOpacity, View } from "react-native"; import { Tag } from "@/components/GenreTags"; // @expo/ui's SwiftUI native module (ExpoUI) does not exist in tvOS builds. // A static top-level import crashes the route tree on tvOS at module load. // Load it lazily and only off-TV; TV never renders this component. const { Button, Host, HStack, Spacer } = Platform.isTV ? ({} as typeof import("@expo/ui/swift-ui")) : require("@expo/ui/swift-ui"); const { buttonStyle } = Platform.isTV ? ({} as typeof import("@expo/ui/swift-ui/modifiers")) : require("@expo/ui/swift-ui/modifiers"); type ViewType = "Favorites" | "Watchlist"; interface FavoritesTabButtonsProps { viewType: ViewType; setViewType: (type: ViewType) => void; t: (key: string) => string; } export const FavoritesTabButtons: React.FC = ({ viewType, setViewType, t, }) => { if (Platform.OS === "ios" && !Platform.isTV) { return (