import { f as Computed } from "../children-s3nFjpLA.mjs"; //#region src/utilities/routing.d.ts /** * Monkey-patches `history.pushState` / `history.replaceState` to dispatch * `pushstate` and `replacestate` events on `window`. * * Needed because the platform only fires `popstate` on back/forward * navigation — `currentLocation` and anything else that reacts to * programmatic navigation needs these synthetic events. * * Call once at app boot (or before any router-driven navigation). Safe to * call outside a browser — it no-ops. */ declare function patchHistory(): void; type NavigateOptions = { replace?: boolean; state?: unknown; }; /** * Navigates to `url` via `history.pushState` (or `replaceState` when * `replace` is `true`). * * `history.pushState` / `replaceState` are patched once at module load so * all navigation — including third-party router calls — dispatches the * `pushstate` / `replacestate` events that `currentLocation` signals react to. */ declare function navigate(url: string | URL, { replace, state }?: NavigateOptions): void; /** * Returns `true` when a click event on an `` element should be handled * client-side — same origin, primary button, no modifier keys, no download, * no `_blank` target. Walks up to the nearest anchor via `closest("a")`. * * Use alongside `navigate()` to intercept anchor clicks: * * ```ts * el.addEventListener("click", (e) => { * if (isLocalNavigationEvent(e)) { e.preventDefault(); navigate(el.href); } * }); * ``` */ declare function isLocalNavigationEvent(e: MouseEvent): boolean; /** * Returns `Computed` — `true` when the current URL matches `input`. * Uses `URLPattern.test()` — faster than `match` when you don't need * captured groups. * * Use object form: `{ pathname: "/users/:id" }`. Relative string patterns * require a base URL and will throw. * * Requires `urlpattern-polyfill` for Safari < 26 and Firefox < 142. */ declare function matches(input: URLPatternInput, options?: URLPatternOptions): Computed; /** * Returns `Computed` — the full match result when * the current URL matches `input`, `null` when it does not. * Use when you need captured groups (params). For a boolean gate, * prefer `matches()` which is faster. * * Use object form: `{ pathname: "/users/:id" }`. Relative string patterns * require a base URL and will throw. * * Requires `urlpattern-polyfill` for Safari < 26 and Firefox < 142. */ declare function match(input: URLPatternInput, options?: URLPatternOptions): Computed; //#endregion export { isLocalNavigationEvent, match, matches, navigate, patchHistory };