import ConfigurationDetail from "@settings/pages/configuration-detail/ConfigurationDetail";
import ConfigurationList from "@settings/pages/configuration-list/ConfigurationList";
import Configuration from "@settings/pages/configuration/Configuration";
import GridManager from "@settings/pages/grid-manager/GridManager";
import DashboardOverview from "@settings/pages/dashboard-overview/DashboardOverview";
import DashboardSitePreferences from "@settings/pages/dashboard-site-preferences/DashboardSitePreferences";
import Settings from "@settings/pages/settings/Settings";
import ReactivateSubscription from "@settings/pages/reactivate-subscription/ReactivateSubscription";
import UpgradePlan from "@settings/pages/upgrade-plan/UpgradePlan";

import React from "react";
import { Route, Routes } from "react-router-dom";
import Redirect from "./Redirect";

const AppRoutes = () => {
  return (
    <Routes>
      <Route path="configuration" element={<Configuration />}>
        <Route index element={<ConfigurationList />} />
        <Route path="new" element={<ConfigurationDetail addNew />} />
        <Route path=":id" element={<ConfigurationDetail />} />
      </Route>
      <Route path="grid-manager" element={<GridManager />} />
      <Route path="dashboard/overview" element={<DashboardOverview />} />
      <Route
        path="dashboard/site-preferences"
        element={<DashboardSitePreferences />}
      />
      <Route path="settings" element={<Settings />} />
      <Route
        path="reactivate-subscription"
        element={<ReactivateSubscription />}
      />
      <Route path="upgrade-plan" element={<UpgradePlan />} />
      <Route path="*" element={<Redirect />} />
    </Routes>
  );
};

export default AppRoutes;
