import { ThemedText } from '@/components/themed-text'; import { AVPlaybackStatus, ResizeMode, Video } from 'expo-av'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { ActivityIndicator, Dimensions, Modal, PanResponder, Platform, StatusBar, StyleSheet, TouchableOpacity, View, BackHandler, } from 'react-native'; const { width: screenWidth, height: screenHeight } = Dimensions.get('window'); export interface FullscreenVideoModalProps { visible: boolean; onClose: () => void; videoUrl: string; poster?: string; autoPlay?: boolean; isLooping?: boolean; isMuted?: boolean; onPrevious?: () => void; onNext?: () => void; hasNext?: boolean; hasPrevious?: boolean; } export function FullscreenVideoModal({ visible, onClose, videoUrl, poster, autoPlay = true, isLooping = true, isMuted = false, onPrevious, onNext, hasNext = false, hasPrevious = false, }: FullscreenVideoModalProps) { const videoRef = useRef