const preact = require('preact');
const { connect } = require('preact-redux');

const Header = require('./header.container');
const Main = require('./main');
const Nav = require('./nav');

const addState = connect(
    state => ({ showNav: state.showNav })
);

const Mnml = ({ showNav, setShowNav }) =>
    <div id="mnml" className={showNav ? 'nav-visible' : ''}>
        <Header />
        <Nav />
        <Main />
    </div>;

module.exports = addState(Mnml);
