import { ActiveRouteProp } from '../models/general.model'; import { NavMainEntity, MainNavScoreList } from '../models/header.model'; /** * Activate the current route based on the config and the match mode * @param config Main Navigation Config * @param activeRouteProp Match mode or custom URL to compare against * @returns Modified Main Navigation Config */ export declare const markActiveRoute: (config: NavMainEntity[], activeRouteProp: ActiveRouteProp) => NavMainEntity[]; /** * Check if the portal config set any active route * @param config Main navigation config * @returns True if portal set any route as active */ export declare const hasActivePortalRoute: (config: NavMainEntity[]) => boolean; export declare const resetActiveStateToPortalConfig: (config: NavMainEntity[]) => NavMainEntity[]; /** * Compile a list of scores based on how well nav items match the reference URL * @param config Main Nav Config * @param referenceUrl URL to compare nav items against (window.location or custom) * @param activeRouteProp Match mode * @returns A list of scored URLs if any matched */ export declare const compileScoreList: (config: NavMainEntity[], referenceUrl: URL, activeRouteProp: ActiveRouteProp, isRelativeReference: boolean) => MainNavScoreList; /** * Compare a nav item URL against the reference URL for similarity * @param referenceUrl URL we're comparing against (from window.location or custom) * @param navItemUrl URL from the navigation item * @param matchMode exact or auto matching * @returns Score indicating how well the URLs match */ export declare const compareRoutes: (referenceUrl: URL, navItemUrl: URL, isRelativeReference: boolean, matchMode?: 'auto' | 'exact') => number; /** * Check how many items in an array match * @param a Reference array * @param b Nav item array to compare * @returns Score */ export declare const getSimilarityScore: (a: string[], b: string[]) => number;