// src/app/router/router.tsx
import { createBrowserRouter, Navigate } from 'react-router-dom'

import { AppLayout } from '../layouts/AppLayout'
import { DevicesPage } from '../../pages/DevicesPage/DevicesPage'
//import { DevicePage } from '../../pages/DevicePage/DevicePage'
import { MapPage } from '../../pages/MapPage/MapPage'
import { EmployeesPage } from '../../pages/EmployeesPage/EmployeesPage'

export const router = createBrowserRouter([
  {
    path: '/',
    element: <AppLayout />,
    children: [
      {
        index: true,
        element: <Navigate to="/devices" replace />,
      },
      {
        path: 'devices',
        element: <DevicesPage />,
      },/* 
      {
        path: 'devices/:deviceId',
        element: <DevicePage />,
      }, */
      {
        path: 'map',
        element: <MapPage />,
      },
      {
        path: 'employees',
        element: <EmployeesPage />,
      },
    ],
  },
])