import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import "./index.css";
import "./i18n";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Home from "./pages/Home.jsx";
import CabinetMaintenace from "./pages/CabinetMaintenance.jsx";
import CabinetCreation from "./pages/CabinetCreation.jsx";
import LockersRegistration from "./pages/LockersRegistration.jsx";
import AccountCreation from "./pages/AccountCreation.jsx";
import LockerMaintenance from "./pages/LockerMaintenance.jsx";
import LockerStatus from "./pages/LockerStatus.jsx";
import KeySwap from "./pages/KeySwap.jsx";

const router = createBrowserRouter([
  {
    path: "/",
    element: <App />,
    children: [
      {
        index: true,
        element: <Home />,
      },
      {
        path: "operation/cabinet",
        element: <CabinetMaintenace />,
      },
      {
        path: "operation/cabinet/create",
        element: <CabinetCreation />,
      },
      {
        path: "operation/cabinet/create/register-lockers",
        element: <LockersRegistration />,
      },
      {
        path: "operation/account",
        element: <AccountCreation />,
      },
      {
        path: "operation/locker",
        element: <LockerMaintenance />,
      },
      {
        path: "operation/locker/status",
        element: <LockerStatus />,
      },
      {
        path: "operation/locker/key-swap",
        element: <KeySwap />,
      }
    ],
  },
]);

createRoot(document.getElementById("root")).render(
  <StrictMode>
    <RouterProvider router={router} />
  </StrictMode>
);
