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 (
    <SafeAreaView>
      <ImageView
        onRequestClose={() => setPreviewVisible(false)}
        visible={previewVisible}
        images={photos}
        imageIndex={imgIndex}
        // onImageIndexChange={(...props) => {
        //  // console.log(props);
        // }}
      />
    </SafeAreaView>
  );
