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

// const Header = require('./header');
const Main = require('./main');
const Nav = require('./nav');
const Controls = require('./controls');
const Footer = require('./footer');

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

const Mnml = ({ showNav }) =>
    <div id="mnml" class={showNav ? 'nav-visible' : ''}>
        <Nav />
        <Main />
        <Controls />
        <Footer />
    </div>;

module.exports = addState(Mnml);
