import React from 'react'
import ReactDOM from 'react-dom'
import './css/home.css'
import 'bootstrap/dist/css/bootstrap.min.css'
import App from './App'
import reportWebVitals from './reportWebVitals'
import { HashRouter, Route, Routes } from 'react-router-dom'
import { Provider } from 'react-redux'
import { store } from './store/store'
import { Login } from './Components/Login/login'
import Logout from './Components/Logout/logout'
import { ResetCredentials } from './Components/resetCredentials/resetCredentials'
import { Register } from './Components/Register/register'
import { RegisterPermisoClientes } from './Components/registerPermisoClientes/registerPermisoClientes'
import { FotosBodega } from './Components/Bodega/FotosBodega'
import { TraficoCorresponsales } from './Components/Corresponsales/TraficoCorresponsales'
import { DashboardCorresponsales } from './Components/Dashboard/DashboardCorresponsales'
import { Dashboard } from './Components/Dashboard/Dashboard'
import { RptCorresponsalesTraficos } from './Components/Reportes/RptCorresponsalesTraficos'
import { CatTabuladores } from './Components/Catalogos/CatTabulador/CatTabulador'
import { RptOperaciones } from './Components/Reportes/RptOperaciones'
import { RptPedidos } from './Components/Clientes/CasaCuervo/Reportes/RptPedidos'
import { Rpt1868Facturas } from './Components/Clientes/ZincInternacional/Rpt1868Facturas'
import { Rpt1868Transportista } from './Components/Clientes/ZincInternacional/Transportistas/Rtp1868Transportista'
import { AvisoCruce } from './Components/AgenciaAduanal/AvisoCruce/AvisoCruce'
import { RptCorresponsalesTraficosHst } from './Components/Reportes/RptCorresponsalesTraficosHst'
import { FormatoRevision } from './Components/Clientes/CasaCuervo/PDFs/FormatoRevision'
import RptPedimentosPagados from './Components/Reportes/RptPedimentosPagados'
import RptPedimentosPagadosImpuestos from './Components/Reportes/RptPedimentosPagadosImpuestos'
import RptDetalleAnexo24 from './Components/Reportes/RptDetalleAnexo24'
import RptOperacionesRemesa from './Components/Reportes/RptOperacionesRemesa'
import RptArchivoElectronicoOficial from './Components/Reportes/RptArchivoElectronicoOficial'
import RptPedimentosConsolidados from './Components/Reportes/RptPedimentosConsolidados'
import RptOperacionesConsolidadas from './Components/Reportes/RptOperacionesConsolidadas'
import RptBattery from './Components/Reportes/RptBattery'
import RptControlDocumentosClientes from './Components/Reportes/RptControlDocumentosClientes'
import RptOperacionesDiarias from './Components/Reportes/RptOperacionesDiarias'
import RptRelacionMission from './Components/GEMCO/Facturacion/Anexo/RptRelacionMission'
import RptConsolidadosSinCerrar from './Components/GEMCO/Facturacion/Anexo/RptConsolidadosSinCerrar'
import RptRelacionAlen from './Components/GEMCO/Facturacion/Anexo/RptRelacionAlen'
import { RptFacturasTxtHeineken } from './Components/Reportes/RptFacturasTxtHeineken'
import { Notificaciones } from './Components/Utils/Notificaciones/Notificaciones'
import RtpAmazonPendingInvoices from './Components/Clientes/Amazon/Reportes/RptAmazonPendingInvoices'

function PageNotFound() {
  return (
    <div style={{textAlign:'center', paddingTop: '300px'}}>
      <h2>Sorry, no matching page</h2>
    </div>
  )
}

ReactDOM.render(
  <Provider store={store}>
    <React.StrictMode>
      <HashRouter>
        <Routes>
          <Route path='/' element={<App />}>
            <Route path='/' element={<Dashboard />}></Route>
            <Route path='/login' element={<Login />} />
            <Route path='/logout' element={<Logout />} />
            <Route path='/reset' element={<ResetCredentials />} />
            <Route path='/register' element={<Register />} />
            <Route path='/permisos' element={<RegisterPermisoClientes />} />
            <Route
              path='/rptPedimentosPagados'
              element={<RptPedimentosPagados />}
            />
            <Route
              path='/rptPedimentosPagadosImpuestos'
              element={<RptPedimentosPagadosImpuestos />}
            />
            <Route path='/rptDetalleAnexo24' element={<RptDetalleAnexo24 />} />
            <Route
              path='/rptOperacionesRemesa'
              element={<RptOperacionesRemesa />}
            />
            <Route path='/FotosBodega' element={<FotosBodega />} />
            <Route path='/rptBattery' element={<RptBattery />} />
            <Route
              path='/RptArchivoElectronicoOficial'
              element={<RptArchivoElectronicoOficial />}
            />
            <Route
              path='/RptPedimentosConsolidados'
              element={<RptPedimentosConsolidados />}
            />
            <Route
              path='/RptOperacionesConsolidadas'
              element={<RptOperacionesConsolidadas />}
            />
            <Route
              path='/TraficoCorresponsales'
              element={
                <TraficoCorresponsales
                  IDTrafico={0}
                  onClose={function (val: boolean): void {
                    throw new Error('Function not implemented.')
                  }}
                />
              }
            />
            <Route
              path='/DashboardCorresponsales'
              element={<DashboardCorresponsales />}
            />
            <Route path='/Dashboard' element={<Dashboard />} />
            <Route
              path='/RptCorresponsalesTraficos/:proc/:modo'
              element={<RptCorresponsalesTraficos />}
            />
            <Route
              path='/RptCorresponsalesTraficosHst'
              element={<RptCorresponsalesTraficosHst />}
            />
            <Route path='/RptOperaciones' element={<RptOperaciones />} />
            <Route
              path='/RptControlDocumentosClientes'
              element={<RptControlDocumentosClientes />}
            />
            <Route
              path='/RptRelacionMission'
              element={<RptRelacionMission />}
            />
            <Route
              path='/RptRelacionAlen'
              element={<RptRelacionAlen />}
            />
            <Route
              path='/RptConsolidadosSinCerrar'
              element={<RptConsolidadosSinCerrar />}
            />
            <Route
              path='/RptOperacionesDiarias'
              element={<RptOperacionesDiarias />}
            />
            <Route
              path='/RptFacturasTxtHeineken'
              element={<RptFacturasTxtHeineken />}
            />
            <Route path='/CatTabuladores' element={<CatTabuladores />} />
            <Route path='/RptPedidos' element={<RptPedidos />} />
            <Route path='/Rpt1868Facturas' element={<Rpt1868Facturas />} />
            <Route
              path='/Rpt1868Transportista'
              element={<Rpt1868Transportista />}
            />
            <Route path='/AvisoCruce' element={<AvisoCruce />} />
            <Route path='/Notificaciones' element={<Notificaciones />} />
            <Route
              path='/FormatoRevision/:id'
              element={<FormatoRevision />}
            ></Route>
            <Route path='/RptAmazonPendingInvoices' element={<RtpAmazonPendingInvoices />} />
          </Route>
          <Route path='*' element={<PageNotFound />} />
        </Routes>
      </HashRouter>
    </React.StrictMode>
  </Provider>,
  document.getElementById('root')
)

reportWebVitals()
