import { html } from "lit-html"; import { Route, SLUG_REGEX, ID_REGEX, UUID_REGEX } from "./elements/router/Route"; import "./pages/admin-overview/AdminOverviewPage"; import "./pages/applications/ApplicationListPage"; import "./pages/applications/ApplicationViewPage"; import "./pages/crypto/CertificateKeyPairListPage"; import "./pages/events/EventInfoPage"; import "./pages/events/EventListPage"; import "./pages/events/RuleListPage"; import "./pages/events/TransportListPage"; import "./pages/flows/FlowListPage"; import "./pages/flows/FlowViewPage"; import "./pages/LibraryPage"; import "./pages/outposts/OutpostListPage"; import "./pages/policies/PolicyListPage"; import "./pages/property-mappings/PropertyMappingListPage"; import "./pages/providers/ProviderListPage"; import "./pages/providers/ProviderViewPage"; import "./pages/sources/SourcesListPage"; import "./pages/sources/SourceViewPage"; import "./pages/groups/GroupListPage"; export const ROUTES: Route[] = [ // Prevent infinite Shell loops new Route(new RegExp("^/$")).redirect("/library"), new Route(new RegExp("^#.*")).redirect("/library"), new Route(new RegExp("^/library$"), html``), new Route(new RegExp("^/administration/overview$"), html``), new Route(new RegExp("^/providers$"), html``), new Route(new RegExp(`^/providers/(?${ID_REGEX})$`)).then((args) => { return html``; }), new Route(new RegExp("^/applications$"), html``), new Route(new RegExp(`^/applications/(?${SLUG_REGEX})$`)).then((args) => { return html``; }), new Route(new RegExp("^/sources$"), html``), new Route(new RegExp(`^/sources/(?${SLUG_REGEX})$`)).then((args) => { return html``; }), new Route(new RegExp("^/policies$"), html``), new Route(new RegExp("^/groups$"), html``), new Route(new RegExp("^/flows$"), html``), new Route(new RegExp(`^/flows/(?${SLUG_REGEX})$`)).then((args) => { return html``; }), new Route(new RegExp("^/events/log$"), html``), new Route(new RegExp(`^/events/log/(?${UUID_REGEX})$`)).then((args) => { return html``; }), new Route(new RegExp("^/events/transports$"), html``), new Route(new RegExp("^/events/rules$"), html``), new Route(new RegExp("^/property-mappings$"), html``), new Route(new RegExp("^/outposts$"), html``), new Route(new RegExp("^/crypto/certificates$"), html``), ];