import React from 'react'
import Header from './layout/components/Header'
import Footer from './layout/components/Footer'
import Routes from './routes'
import AlertList from './alerts/components/AlertList'

/** Import CSS Styles */
//import bootstrap from 'bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css'
import './App.css'

/** Main application */
class Main extends React.Component {
  componentDidMount () {
    this.props.configActions.configGetRequest()
    this.props.swisstennisActions.fileListRequest()
    this.props.swisstennisActions.getPlayerListsRequest()
    this.props.swisstennisActions.getPlayerListRequest()
    this.props.swisstennisActions.getCalendarsRequest()
    this.props.swisstennisActions.getCalendarRequest()
    this.props.usersActions.getUserListRequest()
    this.props.sztmActions.fileListRequest()
    this.props.smsActions.getCreditRequest()
  }

  render () {
    return (
      <div className='container'>
        {console.log('Main route', this.props)}
        <Header />
        <Routes {...this.props} />
        <AlertList {...this.props} />
        <Footer />
      </div>
    )
  }
}

export default Main
