import React from 'react'
import PropTypes from 'prop-types'
import { BrowserRouter, Route, Switch } from 'react-router-dom'

/* IMPORT ROLE */
import User from './User' // this is here for devlopment purposes only
/* IMPORT COMPONENTS */
import Footer from '../components/Footer'
import Navigation from '../components/Navigation'
/* IMPORT PAGES */
import NoMatch from '../pages/NoMatch/NoMatchC'
import ProfileC from '../pages/Profile/ProfileC'

const Manager = (props) => {
  if (props.development === true) {
    return (<User userRole={props.userRole} userKey={props.userKey}/>)
  } return (
    <BrowserRouter>
      <div>
        <Navigation />
        <Switch>
          <Route exact path='/' render={() => <p>The correct routes that a Manger can see should be added</p>} />
          <Route exact path='/profile' component={ProfileC} />
          <Route component={NoMatch} />
        </Switch>
        <Footer />
      </div>
    </BrowserRouter>
  )
}

Manager.propTypes = {
  development: PropTypes.bool
}

export default Manager
