import { SafeAreaView } from "react-native";
import React from "react";
import ImageView from "react-native-image-viewing";
export default function MediaCacheOverlay({
photos,
previewVisible,
setPreviewVisible,
imgIndex,
setImgIndex,
}) {
//const videoRef = React.useRef(null);
return (
setPreviewVisible(false)}
visible={previewVisible}
images={photos}
imageIndex={imgIndex}
// onImageIndexChange={(...props) => {
// // console.log(props);
// }}
/>
);
// return (
// setPreviewVisible(false)}
// onRequestClose={() => setPreviewVisible(false)}
// visible={previewVisible}
// transparent={false}
// >
//
// setcurrentIndex(position)}
// onPageScrollStateChanged={(state) =>
// state === "idle" ? setDragging(false) : setDragging(true)
// }
// />
// setPreviewVisible(false)}
// >
//
//
// {!dragging && photos[currentIndex] && photos[currentIndex].videoUrl && (
// {
// await videoRef.current.loadAsync(
// { uri: photos[currentIndex].videoUrl },
// {},
// false
// );
// videoRef.current.presentFullscreenPlayer();
// }}
// >
//
//
// )}
//
//
//
// );
}