import "@goauthentik/web/pages/admin-overview/AdminOverviewPage"; import { html } from "lit"; import { ID_REGEX, Route, SLUG_REGEX, UUID_REGEX } from "./elements/router/Route"; export const ROUTES: Route[] = [ // Prevent infinite Shell loops new Route(new RegExp("^/$")).redirect("/administration/overview"), new Route(new RegExp("^#.*")).redirect("/administration/overview"), new Route(new RegExp("^/library$")).redirect("/if/user/", true), // statically imported since this is the default route new Route(new RegExp("^/administration/overview$"), async () => { return html``; }), new Route(new RegExp("^/administration/dashboard/users$"), async () => { await import("@goauthentik/web/pages/admin-overview/DashboardUserPage"); return html``; }), new Route(new RegExp("^/administration/system-tasks$"), async () => { await import("@goauthentik/web/pages/system-tasks/SystemTaskListPage"); return html``; }), new Route(new RegExp("^/core/providers$"), async () => { await import("@goauthentik/web/pages/providers/ProviderListPage"); return html``; }), new Route(new RegExp(`^/core/providers/(?${ID_REGEX})$`), async (args) => { await import("@goauthentik/web/pages/providers/ProviderViewPage"); return html``; }), new Route(new RegExp("^/core/applications$"), async () => { await import("@goauthentik/web/pages/applications/ApplicationListPage"); return html``; }), new Route(new RegExp(`^/core/applications/(?${SLUG_REGEX})$`), async (args) => { await import("@goauthentik/web/pages/applications/ApplicationViewPage"); return html``; }), new Route(new RegExp("^/core/sources$"), async () => { await import("@goauthentik/web/pages/sources/SourceListPage"); return html``; }), new Route(new RegExp(`^/core/sources/(?${SLUG_REGEX})$`), async (args) => { await import("@goauthentik/web/pages/sources/SourceViewPage"); return html``; }), new Route(new RegExp("^/core/property-mappings$"), async () => { await import("@goauthentik/web/pages/property-mappings/PropertyMappingListPage"); return html``; }), new Route(new RegExp("^/core/tokens$"), async () => { await import("@goauthentik/web/pages/tokens/TokenListPage"); return html``; }), new Route(new RegExp("^/core/tenants$"), async () => { await import("@goauthentik/web/pages/tenants/TenantListPage"); return html``; }), new Route(new RegExp("^/policy/policies$"), async () => { await import("@goauthentik/web/pages/policies/PolicyListPage"); return html``; }), new Route(new RegExp("^/policy/reputation$"), async () => { await import("@goauthentik/web/pages/policies/reputation/ReputationListPage"); return html``; }), new Route(new RegExp("^/identity/groups$"), async () => { await import("@goauthentik/web/pages/groups/GroupListPage"); return html``; }), new Route(new RegExp(`^/identity/groups/(?${UUID_REGEX})$`), async (args) => { await import("@goauthentik/web/pages/groups/GroupViewPage"); return html``; }), new Route(new RegExp("^/identity/users$"), async () => { await import("@goauthentik/web/pages/users/UserListPage"); return html``; }), new Route(new RegExp(`^/identity/users/(?${ID_REGEX})$`), async (args) => { await import("@goauthentik/web/pages/users/UserViewPage"); return html``; }), new Route(new RegExp("^/flow/stages/invitations$"), async () => { await import("@goauthentik/web/pages/stages/invitation/InvitationListPage"); return html``; }), new Route(new RegExp("^/flow/stages/prompts$"), async () => { await import("@goauthentik/web/pages/stages/prompt/PromptListPage"); return html``; }), new Route(new RegExp("^/flow/stages$"), async () => { await import("@goauthentik/web/pages/stages/StageListPage"); return html``; }), new Route(new RegExp("^/flow/flows$"), async () => { await import("@goauthentik/web/pages/flows/FlowListPage"); return html``; }), new Route(new RegExp(`^/flow/flows/(?${SLUG_REGEX})$`), async (args) => { await import("@goauthentik/web/pages/flows/FlowViewPage"); return html``; }), new Route(new RegExp("^/events/log$"), async () => { await import("@goauthentik/web/pages/events/EventListPage"); return html``; }), new Route(new RegExp(`^/events/log/(?${UUID_REGEX})$`), async (args) => { await import("@goauthentik/web/pages/events/EventInfoPage"); return html``; }), new Route(new RegExp("^/events/transports$"), async () => { await import("@goauthentik/web/pages/events/TransportListPage"); return html``; }), new Route(new RegExp("^/events/rules$"), async () => { await import("@goauthentik/web/pages/events/RuleListPage"); return html``; }), new Route(new RegExp("^/outpost/outposts$"), async () => { await import("@goauthentik/web/pages/outposts/OutpostListPage"); return html``; }), new Route(new RegExp("^/outpost/integrations$"), async () => { await import("@goauthentik/web/pages/outposts/ServiceConnectionListPage"); return html``; }), new Route(new RegExp("^/crypto/certificates$"), async () => { await import("@goauthentik/web/pages/crypto/CertificateKeyPairListPage"); return html``; }), ];