import React, { lazy } from "react";
import { Route } from "react-router-dom";
import ProtectedRoute from "../../auth/ProtectedRoute";
import { LazyRoute } from "../../common/LazyRoute";

const Questions = lazy(() => import("./Questions"));
const QuestionUpdations = lazy(() => import("./pages/QuestionUpdations"));

export const questionsManagementRoutes = [
  <Route
    key="questions"
    path="/questions"
    element={
      <ProtectedRoute>
        <LazyRoute>
          <Questions />
        </LazyRoute>
      </ProtectedRoute>
    }
  />,
  <Route
    key="question-profile"
    path="/question-profile/:id"
    element={
      <ProtectedRoute>
        <LazyRoute>
          <QuestionUpdations />
        </LazyRoute>
      </ProtectedRoute>
    }
  />,
];
