/**
 * 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 InstaView from './instaView';
import { NavigationStackScreenProps, withNavigation } from 'react-navigation';


interface InstaProps extends NavigationStackScreenProps {
}
interface InstaState {
    shouldPlay: boolean
    isMuted: boolean
}
class InstaContainer extends Component<InstaProps, InstaState> {
    constructor(props: InstaProps) {
        super(props);
        this.state = {
            shouldPlay: false,
            isMuted: true,
        };
    }

    goToPlaySound = () => {
        const { shouldPlay, isMuted } = this.state

        this.setState({
            shouldPlay: !shouldPlay,
            isMuted: !isMuted,
        });
    }
    render() {
        const imageUrl: any = require('../../../../assets/star/chat4.jpg');
        const { shouldPlay, isMuted, } = this.state

        return (
            <InstaView
                shouldPlay={shouldPlay}
                isMuted={isMuted}
                goToPlaySound={this.goToPlaySound}
            />
        );
    }
}

export default withNavigation(InstaContainer);