import Route from "./Route"; import RouterInterface from "./RouterInterface"; import ConfigInterface from "../config/ConfigInterface"; import RouteMiddlewareInterface from "./RouteMiddlewareInterface"; import ApplicationInterface from "../foundation/ApplicationInterface"; interface GroupInfo { path: string; component: object; area: null | object; children: Array; meta: { data: object; layout: string; middleware: Array; }; } interface RedirectRoute { path: string; redirect: string; } export default class VueRouterService implements RouterInterface { router: any; routes: Array; protected groupInfo: any; protected currentGroupLevel: number; protected app: ApplicationInterface; protected groups: Array; protected configService: ConfigInterface; protected wildCardRoutes: Array; constructor(app: ApplicationInterface, configService: ConfigInterface); getRouter(): any; register(routes: any, ...services: any[]): this; buildRouter(): void; route(path: string, component: string | object, props?: boolean): Route; protected convertRoutePathToRouteName(route: Route, path?: string): void; middleware(middleware: Array): this; redirect(path: string, redirect: string): this; group(routes: Function): this; area(area: object): this; prefix(prefix: string): this; layout(layout: any): this; data(data: any): this; /** * We loop through all middleware of that route * Making sure we resolve them one at a time */ setupMiddleware(): void; protected getMiddleware(middleware: any): RouteMiddlewareInterface; /** * We build all the group information by looping through each level * * Each group will go up in a level with a child group is made * * We then go through each grouping and set middleware / areas * and place the children for that group. * * By going up and down for each group we retain the data for the group level * allowing us to chain in a pretty way */ protected resetGroup(): void; } export {};