import type { ResolvedRoute, RouteTarget } from './routes.js'; export type GuardResult = boolean | { redirect: string; } | Promise; export interface GuardContext { pathname: string; params: Record; target: RouteTarget; } export type RouteGuard = (ctx: GuardContext) => GuardResult; export interface GuardedRouteTarget extends RouteTarget { guards?: RouteGuard[]; } export declare function runGuards(resolved: ResolvedRoute, pathname: string, globalGuards?: RouteGuard[]): Promise<{ allowed: true; } | { allowed: false; redirect?: string; }>; export declare function createAuthGuard(options: { isAuthenticated: () => boolean | Promise; loginPath: string; }): RouteGuard; export declare function createRoleGuard(options: { getRoles: () => string[] | Promise; required: string[]; fallbackPath: string; }): RouteGuard; //# sourceMappingURL=guards.d.ts.map