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 PrinterProfiles = lazy(
  () => import('../components/Dashboard/Production/PrinterProfiles.jsx')
)
const FilamentProfiles = lazy(
  () => import('../components/Dashboard/Production/FilamentProfiles.jsx')
)
const Jobs = lazy(() => import('../components/Dashboard/Production/Jobs.jsx'))
const SubJobs = lazy(
  () => import('../components/Dashboard/Production/SubJobs.jsx')
)
const GCodeFiles = lazy(
  () => import('../components/Dashboard/Production/GCodeFiles')
)
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='printerprofiles'
    path='production/printerprofiles'
    element={<PrinterProfiles />}
  />,
  <Route
    key='filamentprofiles'
    path='production/filamentprofiles'
    element={<FilamentProfiles />}
  />,
  <Route key='jobs' path='production/jobs' element={<Jobs />} />,
  <Route key='subjobs' path='production/subjobs' element={<SubJobs />} />,
  <Route
    key='gcodefiles'
    path='production/gcodefiles'
    element={<GCodeFiles />}
  />,
  <Route
    key='gcodefiles-preview'
    path='production/gcodefiles/preview'
    element={<GCodeFilePreview />}
  />
]

export default ProductionRoutes
