import React from 'react';
import { Router, LocationProvider } from '@reach/router';
import { ThemeProvider } from '@material-ui/styles';
import { Home } from 'modules/home/home';
import { Tickets } from 'modules/tickets/tickets';
import { CashDesk } from 'modules/cash-desk/cash-desk';
import { AppContextProvider } from 'context/app-context';
import { Admin } from 'modules/admin/admin';
import { Login } from 'components/login/login';
import { theme } from 'components/theme/theme';

export const App: React.FC = () => {
  return (
    <AppContextProvider>
      <LocationProvider>
        <ThemeProvider theme={theme}>
          <Router>
            <Home path="/" />
            <Tickets path="/tickets" />
            <CashDesk path="/cash-desk" />
            <Admin path="/admin" />
            <Login path="/login" />
          </Router>
        </ThemeProvider>
      </LocationProvider>
    </AppContextProvider>
  );
};

export default App;
