import "@goauthentik/admin/admin-overview/AdminOverviewPage"; import { ID_REGEX, Route, SLUG_REGEX, UUID_REGEX } from "@goauthentik/elements/router/Route"; import { html } from "lit"; 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/admin/admin-overview/DashboardUserPage"); return html``; }), new Route(new RegExp("^/administration/system-tasks$"), async () => { await import("@goauthentik/admin/system-tasks/SystemTaskListPage"); return html``; }), new Route(new RegExp("^/core/providers$"), async () => { await import("@goauthentik/admin/providers/ProviderListPage"); return html``; }), new Route(new RegExp(`^/core/providers/(?${ID_REGEX})$`), async (args) => { await import("@goauthentik/admin/providers/ProviderViewPage"); return html``; }), new Route(new RegExp("^/core/applications$"), async () => { await import("@goauthentik/admin/applications/ApplicationListPage"); return html``; }), new Route(new RegExp(`^/core/applications/(?${SLUG_REGEX})$`), async (args) => { await import("@goauthentik/admin/applications/ApplicationViewPage"); return html``; }), new Route(new RegExp("^/core/sources$"), async () => { await import("@goauthentik/admin/sources/SourceListPage"); return html``; }), new Route(new RegExp(`^/core/sources/(?${SLUG_REGEX})$`), async (args) => { await import("@goauthentik/admin/sources/SourceViewPage"); return html``; }), new Route(new RegExp("^/core/property-mappings$"), async () => { await import("@goauthentik/admin/property-mappings/PropertyMappingListPage"); return html``; }), new Route(new RegExp("^/core/tokens$"), async () => { await import("@goauthentik/admin/tokens/TokenListPage"); return html``; }), new Route(new RegExp("^/core/tenants$"), async () => { await import("@goauthentik/admin/tenants/TenantListPage"); return html``; }), new Route(new RegExp("^/policy/policies$"), async () => { await import("@goauthentik/admin/policies/PolicyListPage"); return html``; }), new Route(new RegExp("^/policy/reputation$"), async () => { await import("@goauthentik/admin/policies/reputation/ReputationListPage"); return html``; }), new Route(new RegExp("^/identity/groups$"), async () => { await import("@goauthentik/admin/groups/GroupListPage"); return html``; }), new Route(new RegExp(`^/identity/groups/(?${UUID_REGEX})$`), async (args) => { await import("@goauthentik/admin/groups/GroupViewPage"); return html``; }), new Route(new RegExp("^/identity/users$"), async () => { await import("@goauthentik/admin/users/UserListPage"); return html``; }), new Route(new RegExp(`^/identity/users/(?${ID_REGEX})$`), async (args) => { await import("@goauthentik/admin/users/UserViewPage"); return html``; }), new Route(new RegExp("^/flow/stages/invitations$"), async () => { await import("@goauthentik/admin/stages/invitation/InvitationListPage"); return html``; }), new Route(new RegExp("^/flow/stages/prompts$"), async () => { await import("@goauthentik/admin/stages/prompt/PromptListPage"); return html``; }), new Route(new RegExp("^/flow/stages$"), async () => { await import("@goauthentik/admin/stages/StageListPage"); return html``; }), new Route(new RegExp("^/flow/flows$"), async () => { await import("@goauthentik/admin/flows/FlowListPage"); return html``; }), new Route(new RegExp(`^/flow/flows/(?${SLUG_REGEX})$`), async (args) => { await import("@goauthentik/admin/flows/FlowViewPage"); return html``; }), new Route(new RegExp("^/events/log$"), async () => { await import("@goauthentik/admin/events/EventListPage"); return html``; }), new Route(new RegExp(`^/events/log/(?${UUID_REGEX})$`), async (args) => { await import("@goauthentik/admin/events/EventViewPage"); return html``; }), new Route(new RegExp("^/events/transports$"), async () => { await import("@goauthentik/admin/events/TransportListPage"); return html``; }), new Route(new RegExp("^/events/rules$"), async () => { await import("@goauthentik/admin/events/RuleListPage"); return html``; }), new Route(new RegExp("^/outpost/outposts$"), async () => { await import("@goauthentik/admin/outposts/OutpostListPage"); return html``; }), new Route(new RegExp("^/outpost/integrations$"), async () => { await import("@goauthentik/admin/outposts/ServiceConnectionListPage"); return html``; }), new Route(new RegExp("^/crypto/certificates$"), async () => { await import("@goauthentik/admin/crypto/CertificateKeyPairListPage"); return html``; }), new Route(new RegExp("^/blueprints/instances$"), async () => { await import("@goauthentik/admin/blueprints/BlueprintListPage"); return html``; }), new Route(new RegExp("^/debug$"), async () => { await import("@goauthentik/admin/DebugPage"); return html``; }), ];