/**
 * React Native Full App (https://store.enappd.com/product/react-native-full-app)
 *
 * Copyright © 2019-present Enappd. All rights reserved.
 *
 * This source code is licensed as per the terms found in the
 * LICENSE.md file in the root directory of this source tree.
 */
import React from 'react';
import { ScrollView, View, Text } from 'react-native';
import { Thumbnail } from 'native-base';
import styles from '../instaStyles';
interface StoriesProps {
    storeyJson: Array<any>
}
class StoriesComponent extends React.Component<StoriesProps> {
    constructor(props: StoriesProps) {
        super(props);
        this.state = {};
    }
    render() {
        const props = this.props
        return (

            <View style={styles.swiperView}>

                <ScrollView
                    horizontal
                    showsHorizontalScrollIndicator={false}
                    showsVerticalScrollIndicator={false}
                    contentContainerStyle={styles.storiesContainer}
                >
                    {props.storeyJson.map((stories: any, index: number) => {
                        return (
                            <View style={styles.scrollContent} key={index}>
                                <View style={styles.scrollImageView}>
                                    <Thumbnail source={stories.image} />
                                </View>
                                <Text style={styles.scrollTextView} numberOfLines={1}>{stories.name}</Text>
                            </View>
                        );
                    })
                    }
                </ScrollView>

            </View>
        );
    }
}

export default StoriesComponent;