import { Dimensions, FlatList, GestureResponderEvent, Image, StyleSheet, Text, TouchableOpacity, View, } from "react-native"; import React, { RefObject, useEffect, useRef } from "react"; import { useAOPSlot } from "../../utils/stateUtilHooks"; import Icon from "react-native-vector-icons/MaterialCommunityIcons"; import Button from "../atoms/Button"; import Video from "react-native-video"; import { Slot } from "../../types/AOP"; type Props = { openSettingsCallback?: (event: GestureResponderEvent) => void; }; const SlotListLandscape = (props: Props) => { const { slotList, activeSlotIndex, setSOPSlotFromIndex } = useAOPSlot(); const SlotListLandscapeRef = useRef>(null); return ( { setTimeout(() => { SlotListLandscapeRef.current?.scrollToIndex({ index: activeSlotIndex, }); }, 10); }} keyExtractor={(item) => item.slotId} onScrollToIndexFailed={() => console.log("failed to scroll")} ListHeaderComponent={() => } ItemSeparatorComponent={() => } showsVerticalScrollIndicator={false} showsHorizontalScrollIndicator={false} renderItem={({ item, index }) => { return ( setSOPSlotFromIndex(index)} > {item.isComplete && item.action ? ( item.action.sourceType === "DeviceCamera" ? ( item.key ? ( Use 360 Viewer ) : item.action.captureType === "Image" ? ( ) : ( ); }} />