import { Ionicons } from "@expo/vector-icons"; import React from "react"; import { Platform, TouchableOpacity } from "react-native"; import { useHaptic } from "@/hooks/useHaptic"; const DropdownMenu = !Platform.isTV ? require("zeego/dropdown-menu") : null; export type AspectRatio = "default" | "16:9" | "4:3" | "1:1" | "21:9"; interface AspectRatioSelectorProps { currentRatio: AspectRatio; onRatioChange: (ratio: AspectRatio) => void; disabled?: boolean; } interface AspectRatioOption { id: AspectRatio; label: string; description: string; } const ASPECT_RATIO_OPTIONS: AspectRatioOption[] = [ { id: "default", label: "Original", description: "Use video's original aspect ratio", }, { id: "16:9", label: "16:9", description: "Widescreen (most common)", }, { id: "4:3", label: "4:3", description: "Traditional TV format", }, { id: "1:1", label: "1:1", description: "Square format", }, { id: "21:9", label: "21:9", description: "Ultra-wide cinematic", }, ]; export const AspectRatioSelector: React.FC = ({ currentRatio, onRatioChange, disabled = false, }) => { const lightHapticFeedback = useHaptic("light"); // Hide on TV platforms since zeego doesn't support TV if (Platform.isTV || !DropdownMenu) return null; const handleRatioSelect = (ratio: AspectRatio) => { onRatioChange(ratio); lightHapticFeedback(); }; return ( Aspect Ratio {ASPECT_RATIO_OPTIONS.map((option) => ( handleRatioSelect(option.id)} > {option.label} {option.description} ))} ); };