import { lazy } from "react";
import type { IndexRouteObject, RouteObject } from "react-router-dom";
import { ErrorPage } from "./root/ErrorPage";
import { Root } from "./root/Root";
import { environment } from "./environment";
const DeviceActivity = lazy(() => import("./account-security/DeviceActivity"));
const LinkedAccounts = lazy(() => import("./account-security/LinkedAccounts"));
const SigningIn = lazy(() => import("./account-security/SigningIn"));
const Applications = lazy(() => import("./applications/Applications"));
const Groups = lazy(() => import("./groups/Groups"));
const PersonalInfo = lazy(() => import("./personal-info/PersonalInfo"));
const Resources = lazy(() => import("./resources/Resources"));
const ContentComponent = lazy(() => import("./content/ContentComponent"));
const AccountExtraPage = lazy(() => import("./d4science-page/AccountExtraPage"));
export const DeviceActivityRoute: RouteObject = {
path: "account-security/device-activity",
element: ,
};
export const LinkedAccountsRoute: RouteObject = {
path: "account-security/linked-accounts",
element: ,
};
export const SigningInRoute: RouteObject = {
path: "account-security/signing-in",
element: ,
};
export const ApplicationsRoute: RouteObject = {
path: "applications",
element: ,
};
export const GroupsRoute: RouteObject = {
path: "groups",
element: ,
};
export const ResourcesRoute: RouteObject = {
path: "resources",
element: ,
};
export type ContentComponentParams = {
componentId: string;
};
export const ContentRoute: RouteObject = {
path: "content/:componentId",
element: ,
};
export const PersonalInfoRoute: IndexRouteObject = {
index: true,
element: ,
};
export const AccountExtraPageRoute: RouteObject = {
path: "d4science-page/account-extra-page",
element: ,
};
export const RootRoute: RouteObject = {
path: new URL(environment.baseUrl).pathname,
element: ,
errorElement: ,
children: [
PersonalInfoRoute,
DeviceActivityRoute,
LinkedAccountsRoute,
SigningInRoute,
ApplicationsRoute,
GroupsRoute,
PersonalInfoRoute,
ResourcesRoute,
ContentRoute,
AccountExtraPageRoute
],
};
export const routes: RouteObject[] = [RootRoute];