import { lazy } from 'react'
import { Route } from 'react-router-dom'

const ProductionOverview = lazy(
  () => import('../components/Dashboard/Production/ProductionOverview')
)
const Printers = lazy(
  () => import('../components/Dashboard/Production/Printers')
)
const ControlPrinter = lazy(
  () => import('../components/Dashboard/Production/Printers/ControlPrinter.jsx')
)
const PrinterInfo = lazy(
  () => import('../components/Dashboard/Production/Printers/PrinterInfo.jsx')
)
const PrinterProfiles = lazy(
  () => import('../components/Dashboard/Production/PrinterProfiles.jsx')
)
const PrinterProfileInfo = lazy(
  () =>
    import('../components/Dashboard/Production/PrinterProfiles/PrinterProfileInfo.jsx')
)
const FilamentProfiles = lazy(
  () => import('../components/Dashboard/Production/FilamentProfiles.jsx')
)
const FilamentProfileInfo = lazy(
  () =>
    import('../components/Dashboard/Production/FilamentProfiles/FilamentProfileInfo.jsx')
)
const Jobs = lazy(() => import('../components/Dashboard/Production/Jobs.jsx'))
const JobInfo = lazy(
  () => import('../components/Dashboard/Production/Jobs/JobInfo.jsx')
)
const SubJobs = lazy(
  () => import('../components/Dashboard/Production/SubJobs.jsx')
)
const SubJobInfo = lazy(
  () => import('../components/Dashboard/Production/SubJobs/SubJobInfo.jsx')
)
const GCodeFiles = lazy(
  () => import('../components/Dashboard/Production/GCodeFiles')
)
const GCodeFileInfo = lazy(
  () =>
    import('../components/Dashboard/Production/GCodeFiles/GCodeFileInfo.jsx')
)
const GCodeFilePreview = lazy(
  () =>
    import('../components/Dashboard/Production/GCodeFiles/GCodeFilePreview.jsx')
)

const ProductionRoutes = [
  <Route
    key='production-overview'
    path='production/overview'
    element={<ProductionOverview />}
  />,
  <Route key='printers' path='production/printers' element={<Printers />} />,
  <Route
    key='printers-control'
    path='production/printers/control'
    element={<ControlPrinter />}
  />,
  <Route
    key='printers-info'
    path='production/printers/info'
    element={<PrinterInfo />}
  />,
  <Route
    key='printerprofiles'
    path='production/printerprofiles'
    element={<PrinterProfiles />}
  />,
  <Route
    key='printerprofiles-info'
    path='production/printerprofiles/info'
    element={<PrinterProfileInfo />}
  />,
  <Route
    key='filamentprofiles'
    path='production/filamentprofiles'
    element={<FilamentProfiles />}
  />,
  <Route
    key='filamentprofiles-info'
    path='production/filamentprofiles/info'
    element={<FilamentProfileInfo />}
  />,
  <Route key='jobs' path='production/jobs' element={<Jobs />} />,
  <Route key='subjobs' path='production/subjobs' element={<SubJobs />} />,
  <Route
    key='subjobs-info'
    path='production/subjobs/info'
    element={<SubJobInfo />}
  />,
  <Route key='jobs-info' path='production/jobs/info' element={<JobInfo />} />,
  <Route
    key='gcodefiles'
    path='production/gcodefiles'
    element={<GCodeFiles />}
  />,
  <Route
    key='gcodefiles-info'
    path='production/gcodefiles/info'
    element={<GCodeFileInfo />}
  />,
  <Route
    key='gcodefiles-preview'
    path='production/gcodefiles/preview'
    element={<GCodeFilePreview />}
  />
]

export default ProductionRoutes
