import type { Ref , ComputedRef , Component } from '@kirei/element' ; export declare function createRouter ( options ) ; export declare function createWebHistory ( base ? ) ; export declare function createWebHashHistory ( base ? ) ; export declare function createMemoryHistory ( base ? ) ; type HistoryStateValue = string | number | boolean | null | undefined | HistoryState | HistoryStateArray ; export interface HistoryState { [ x ] : HistoryStateValue ; [ x ] : HistoryStateValue ; } interface HistoryStateArray extends Array < HistoryStateValue > { } export enum NavigationType { pop = 'pop' , push = 'push' } export enum NavigationDirection { back = 'back' , forward = 'forward' , unknown = '' } export interface NavigationInformation { type : NavigationType ; direction : NavigationDirection ; delta : number ; } export interface NavigationCallback { ( to , from , information ) : void ; } /**
 * Interface implemented by History implementations that can be passed to the
 * router as  Router . history alpha export interface RouterHistory { /**
     * Base path that is prepended to every url. This allows hosting an SPA at a
     * subfolder of a domain like `example.com/subfolder` by having a `base` of
     * `/subfolder`
     */ readonly base : string ; /**
     * Current History location
     */ readonly location : string ; /**
     * Current History state
     */ readonly state : HistoryState ; param to param data - optional  HistoryState to be associated with the
     * navigation entry
      push ( to , data ? ) : void ; /**
     * Same as  RouterHistory . push but performs a `history.replaceState`
     * instead of `history.pushState`
     *
     *  param to param data - optional  HistoryState to be associated with the
     * navigation entry
      replace ( to , data ? ) : void ; example param delta param triggerListeners go ( delta , triggerListeners ? ) : void ; /**
     * Attach a listener to the History implementation that is triggered when the
     * navigation is triggered from outside (like the Browser back and forward
     * buttons) or when passing `true` to  RouterHistory . back and
     *  RouterHistory . forward param callback returns listen ( callback ) : ( ) => void ; param location createHref ( location ) : string ; /**
     * Clears any event listener attached by the history implementation.
     */ destroy ( ) : void ; } export declare const START_LOCATION ; export declare function onBeforeRouteLeave ( leaveGuard ) ; export declare function onBeforeRouteUpdate ( updateGuard ) ; /**
 * Used to add meta fields to every route
 */ export interface RouteMeta extends Record < RouteRecordName | number , any > { } export type RouteRecordName = string | symbol ; export interface NavigationHookAfter { ( to , from , failure ? ) : any ; } export interface RouterLinkOptions { /**
     * Route Location the link should navigate to when clicked on.
     */ to : RouteLocationRaw ; /**
     * Calls `router.replace` instead of `router.push`.
     */ replace ? : boolean ; } export declare function useLink ( props ) ; export declare function useRoute ( ) ; export declare function useRouter ( ) ; export interface RouterOptions { history : RouterHistory ; linkActiveClass ? : string ; linkExactActiveClass ? : string ; parseQuery ? ( searchQuery ) : Record < string , ( string | null ) [ ] | string | null > ; routes : RouteRecordRaw [ ] ; scrollBehavior ? : ScrollBehavior ; stringifyQuery ? ( query ) : string ; } export interface Router { readonly currentRoute : Ref < RouteLocationNormalized > ; readonly options : RouterOptions ; addRoute ( route ) : void ; addRoute ( parentName , route ) : void ; afterEach ( guard ) : void ; back ( ) : void ; beforeEach ( guard ) : void ; beforeResolve ( guard ) : void ; forward ( ) : void ; getRoutes ( ) : RouteRecordNormalized [ ] ; go ( delta ) : void ; hasRoute ( name ) : boolean ; isReady ( ) : Promise < void > ; onError ( handler ) : void ; push ( to ) : Promise < NavigationFailure | void | undefined > ; removeRoute ( name ) : void ; replace ( to ) : Promise < NavigationFailure | void | undefined > ; resolve ( to ) : RouteLocation & { href : string ; } ; } export interface RouteRecordRaw { path : string ; redirect ? : RouteLocationRaw | ( ( to : RouteLocationNormalized ) => RouteLocationRaw ) ; children ? : RouteRecordRaw [ ] ; alias ? : string | string [ ] ; name ? : RouteRecordName ; beforeEnter ? : NavigationGuard | NavigationGuard [ ] ; props ? : boolean | Record < string , any > | ( ( to : RouteLocationNormalized ) => Record < string , any > ) ; meta ? : RouteMeta ; } export interface RouteRecordNormalized { aliasOf ? : RouteRecordNormalized ; beforeEnter ? : NavigationGuard ; children : RouteRecordNormalized ; elements : Record < string , Component > ; meta : RouteMeta ; name ? : RouteRecordName ; path : string ; props : Record < string , boolean | Function | Record < string , any > > ; redirect ? : RouteLocationRaw ; } export type RouteLocationRaw = string | { path ? : string ; hash ? : string ; params ? : Record < string , any > ; query ? : Record < string , any > ; replace ? : boolean ; } ; export type RouteLocation = RouteLocationRaw | { redirect ? : RouteLocationRaw | ( ( to : RouteLocationNormalized ) => RouteLocationRaw ) ; } ; export interface RouteLocationNormalized { fullPath : string ; hash : string ; query : Record < string , string | string [ ] > ; matched : RouteRecordNormalized [ ] ; meta : RouteMeta ; name ? : RouteRecordName | null ; params : Record < string , string | string [ ] > ; path : string ; redirectedFrom ? : RouteLocation ; } export enum NavigationFailureType { aborted = 4 , cancelled = 8 , duplicated = 16 } export interface NavigationFailure { from : RouteLocationNormalized ; to : RouteLocationNormalized ; type : NavigationFailureType ; } export type NavigationGuard = ( to : RouteLocationNormalized , from : RouteLocationNormalized , next ? : Function ) => void ;