import { TokenProviderClAppSlug } from '../providers/TokenProvider/types'; export interface BackToItem { /** * URL to be stored in sessionStorage, it will be the current URL so it can be used to navigate back. */ url: string; /** * Version of the data stored to check if it's compatible with the current code version. */ version: number; } /** * Navigate back to the url found in sessionStorage or to the default relative path. */ export declare function goBack({ setLocation, defaultRelativePath, }: { /** * React router's history.push method, this is used when linking internal app pages. */ setLocation: (url: string) => void; /** * path to default list when there is no url in sessionStorage */ defaultRelativePath: string; }): void; interface NavigateToInternalParams { /** * React router's history.push method, this is used when linking internal app pages. */ setLocation: (url: string) => void; /** * destination instructions to navigate to a detail page */ destination: { /** * app name to navigate to, it could be the current app (internal linking) or another app (cross linking) */ app: TokenProviderClAppSlug; /** * resource id to open */ resourceId?: string; }; } interface NavigateToExternalParams { /** * destination instructions to navigate to a detail page */ destination: { /** * app name to navigate to, it could be the current app (internal linking) or another app (cross linking) */ app: TokenProviderClAppSlug; /** * resource id to open */ resourceId?: string; /** * required when linking to another app, it indicates if the destination app should be opened in test or live mode */ mode: "test" | "live"; }; } /** * Navigate to an internal or external URL or pathname and store the current url in sessionStorage * to be able to navigate back to it with the `goBack` function. */ export declare function navigateTo(params: NavigateToInternalParams | NavigateToExternalParams): { href: string; onClick: (e: React.MouseEvent) => void; } | null; export {};