import * as React from 'react';
import { Switch } from 'react-router';
import { Link, Route } from 'react-router-dom';

import { Main } from './containers/Main';
import { Regist as MemberRegist } from './containers/member/Regist';
import { Login as MemberLogin } from './containers/member/Login';
import NotFound from './NotFound';

import { ProveDownload } from './containers/prove/Download';
import { SensorConfig } from './containers/config/SensorConfig';
import { WaitForAuth } from './containers/agent/WaitForAuth';
import { MemberRegistResult } from './containers/member/RegistResult';
import { MemberEmailConfirm } from './containers/member/EmailConfirm';

export class Routes extends React.Component<any, any> {
  render() {
    return (
      <div>
        <h1>React Redux sample</h1>
        <li><Link to='/' >Home</Link></li>
        <li><Link to='/member/regist' >Member Regist</Link></li>
        <li><Link to='/member/login' >Member Login</Link></li>


        <li><Link to='/member/result' >MemberRegistResult</Link></li>
        <li><Link to='/member/emailconfirm' >MemberEmailConfirm</Link></li>
        <li><Link to='/agent/waitauth' >WaitForAuth</Link></li>

        <li><Link to='/config/sensorconfig' >SensorConfig</Link></li>
        <li><Link to='/prove/download' >ProveDownload</Link></li>
        
        <Switch>
          <Route exact path='/' component={Main} />
          <Route exact path='/member/regist' component={MemberRegist} />
          <Route exact path='/member/login' component={MemberLogin} />
          <Route exact path='/member/result' component={MemberRegistResult} />
          <Route exact path='/member/emailconfirm' component={MemberEmailConfirm} />

          <Route exact path='/agent/waitauth' component={WaitForAuth} />
          <Route exact path='/config/sensorconfig' component={SensorConfig} />
          <Route exact path='/prove/download' component={ProveDownload} />
          <Route component={NotFound} />
        </Switch>
        
      </div>
    );
  }
}
