import { html } from "lit-html"; import { Route, SLUG_REGEX, ID_REGEX, UUID_REGEX } from "./elements/router/Route"; import "./pages/LibraryPage"; import "./pages/admin-overview/AdminOverviewPage"; import "./pages/applications/ApplicationListPage"; import "./pages/applications/ApplicationViewPage"; import "./pages/sources/SourceViewPage"; import "./pages/flows/FlowViewPage"; import "./pages/events/EventListPage"; import "./pages/events/EventInfoPage"; import "./pages/events/TransportListPage"; import "./pages/events/RuleListPage"; import "./pages/providers/ProviderListPage"; import "./pages/providers/ProviderViewPage"; import "./pages/property-mappings/PropertyMappingListPage"; import "./pages/outposts/OutpostListPage"; 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/(?${SLUG_REGEX})$`)).then((args) => { return 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``), ];