/**
* Pure client-side route matching (design.md D7; task 10.1).
*
* The route table here MUST stay in sync with the server's
* `UI_VIEW_SEGMENTS` allowlist (`src/core/web-ui/index.ts`) — every
* top-level segment matched here has a corresponding server registration
* that serves the shell for it, so a reload of any matched path is served
* the same view. No wildcard/catch-all route exists; an unmatched path
* resolves to the `"not-found"` view rather than guessing.
*
* Kept dependency-free (no React, no DOM) so matching is reachable by
* `bun test` (design.md D23) — `router-context.tsx` layers the History API
* and a `` component on top of this, and is the part verified by hand.
*/
export type ViewName = "dashboard" | "rooms" | "room" | "devices" | "unassigned-devices" | "device-detail" | "automations" | "automation-detail" | "state" | "logs" | "homekit" | "not-found";
export interface RouteMatch {
view: ViewName;
params: Record;
}
/**
* Strips `basePath` from the start of `pathname`, returning the remainder
* (always starting with `/`, or empty for an exact match). Returns `null`
* when `pathname` is not beneath `basePath` at all.
*/
export declare function stripBasePath(pathname: string, basePath: string): string | null;
/**
* Matches `pathname` (already stripped of `basePath`) against the route
* table. A parametrised segment (`:id`) captures and URI-decodes that path
* segment; a static segment must match literally, and static segments are
* always preferred over a parametrised one at the same position (so
* `/devices/unassigned` never falls through to `/devices/:qualifiedId`,
* mirroring the server's `/api/rooms/unassigned` vs `/api/rooms/:id`
* ordering convention).
*/
export declare function matchRoute(strippedPathname: string): RouteMatch;
/** Resolves a full `pathname` (as seen by the browser) against `basePath`. */
export declare function resolveRoute(pathname: string, basePath: string): RouteMatch;
export declare function dashboardPath(basePath: string): string;
export declare function roomsPath(basePath: string): string;
export declare function roomPath(basePath: string, roomId: string): string;
export declare function devicesPath(basePath: string): string;
export declare function unassignedDevicesPath(basePath: string): string;
export declare function deviceDetailPath(basePath: string, qualifiedId: string): string;
export declare function automationsPath(basePath: string): string;
export declare function automationDetailPath(basePath: string, name: string): string;
export declare function statePath(basePath: string): string;
export declare function logsPath(basePath: string): string;
export declare function homekitPath(basePath: string): string;
//# sourceMappingURL=router.d.ts.map