import React from 'react'; import Video from 'react-native-video'; import { ActivityIndicator, TouchableWithoutFeedback } from 'react-native'; import type { StoryDetailItemProps } from '../../types'; import { StoryDetailItemLayout } from './Layout'; import { styles } from './styles'; import { useStoryDetailItem } from './hook'; export const StoryDetailItem = React.forwardRef( ( { story, onVideoEnd, onBackPress, isCurrentStory, onVideoTouchEnd, onVideoTouchStart, onTapLeft = () => {}, onTapRight = () => {}, StoryDetailItemHeader = () => null, StoryDetailItemFooter = () => null, }, ref: any ) => { const { mute, muted, progress, duration, goBack, videoRef, visible, paused, onLoadStart, onLoad, onProgress, onEnd, onTouchStart, onTouchEnd, getVideoSource, } = useStoryDetailItem({ ref, story, onVideoEnd, onBackPress, isCurrentStory, onVideoTouchEnd, onVideoTouchStart, StoryDetailItemHeader, StoryDetailItemFooter, } as any); return ( } content={ <> {visible && isCurrentStory && ( )} } footer={ } /> ); } );