/**
 * 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, { Component } from 'react';
import HeaderViewContainer from '../../../components/star/header/headerViewContainer';
import { NavigationStackScreenProps, withNavigation } from 'react-navigation';
import { Container, Content } from 'native-base';
import InstaContainer from './cards/instaContainer';
import StoriesComponent from './stories/stories';
import instaData from '../../../Database/star';
import { View } from 'react-native';
import styles from './instaStyles';

interface InstaProps extends NavigationStackScreenProps {
}
interface InstaMainState {
    shouldPlay: boolean,
    isMuted: boolean,
    playSound: boolean
}
class InstaMain extends React.Component<InstaProps, InstaMainState> {
    constructor(props: InstaProps) {
        super(props);
        this.state = {
            shouldPlay: false,
            isMuted: true,
            playSound: false
        };
    }
    toggleDrawer = () => {
        this.props.navigation.toggleDrawer();
    }

    render() {

        return (
            <Container>
                <HeaderViewContainer
                    hasTabs
                    leftIcon={'menu'}
                    headerTitle={'Instagram'}
                    leftPress={this.toggleDrawer}
                />
                <Content>
                    <View style={styles.cenerViewScroll}>
                        <StoriesComponent
                            storeyJson={instaData.stories} />
                    </View>
                    <InstaContainer />
                </Content>
            </Container>
        );
    }
}

export default withNavigation(InstaMain);