This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web/src/elements/router/RouteMatch.ts

25 lines
537 B
TypeScript

import { TemplateResult } from "lit";
import { Route } from "./Route";
export class RouteMatch {
route: Route;
arguments: { [key: string]: string };
fullUrl?: string;
constructor(route: Route) {
this.route = route;
this.arguments = {};
}
render(): TemplateResult {
return this.route.render(this.arguments);
}
toString(): string {
return `<RouteMatch url=${this.fullUrl} route=${this.route} arguments=${JSON.stringify(
this.arguments,
)}>`;
}
}