/** * 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 { CompiledRouteDefinition, CompiledRoutingMatch, I18nRouterConfig, NavigateOptions, PageReference } from './types.js'; export declare const DEFAULT_I18N_ROUTER_CONFIG: I18nRouterConfig; /** * f(URL, routes[]?) -> route * Match a URL's path to a Route Definition, use these to build a route. * * @param {string} url - URL string to turn into a route * @param {array[object]} routeDefs - List of Route Definitions to match to the url * @param {string} basePath - Optional: if provided, remove the base path before conversion. * @param {object} i18n - Optional: if provided, remove the non-default locale before conversion. * * @returns {object} */ export declare function matchRouteByUrl(url: string, routeDefs: CompiledRouteDefinition[], basePath?: string, i18n?: I18nRouterConfig, options?: NavigateOptions): CompiledRoutingMatch | null; /** * Serializes the given pageReference into a url based on the first route definition * with a binding the pageReference matches against. * @param pageReference pageReference to serialize into url * @param routeDefs RouteDefs to match pageReference against * @param basePath Base path for the url * @returns the url or null if no match */ export declare function getUrlFromPageReference(pageReference: PageReference, routeDefs: CompiledRouteDefinition[], basePath?: string, i18n?: I18nRouterConfig, options?: NavigateOptions): string | null; /** * Generates a url for the given pageReference using the given routeDef * @param pageReference pageReference to serialize * @param routeDef routeDef to that defines how serialize the given pageReference * @returns url for the given pageReference */ export declare function getUrlFromPageReferenceAndRouteDef(pageReference: PageReference, routeDef: CompiledRouteDefinition, basePath?: string, i18n?: I18nRouterConfig, options?: NavigateOptions): string; /** * Obtains the pageReference for the given URL */ export declare function getPageReferenceFromUrl(url: string, routeDefs: CompiledRouteDefinition[], basePath?: string, i18n?: I18nRouterConfig): PageReference | null; //# sourceMappingURL=routeUtils.d.ts.map