/** * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ import type { Filter, MessageObject } from 'lwr/routerUtils'; import type { PageReference, RouteCallback, Router } from 'lwr/router'; import type { DomRouterConfig, RouteChange } from 'lwr/domRouterUtils'; import type { ContextId } from 'lwr/navigationContext'; export interface RouterApi { addPreNavigate: (filter: Filter) => RouterApi; addPostNavigate: (listener: RouteCallback) => RouterApi; addErrorNavigate: (listener: Filter) => RouterApi; connect: () => void; disconnect: () => void; id?: ContextId; } export interface RouterConfigApi extends DomRouterConfig { historyDisabled?: boolean; } /** * Create a new navigation context, attach to the given node. * An application can only have ONE root router. * * @param {HTMLElement} - The DOM node where the navigation context should be established * @param {object} config - The router config object, all properties are optional * * @returns {object} - { addPreNavigate, addPostNavigate, addErrorNavigate, connect, disconnect } */ export declare function createNavigationContext(node: EventTarget, config: RouterConfigApi | undefined, portableRouter: Router): RouterApi; //# sourceMappingURL=utils.d.ts.map