import type { HydrateState } from "../Contexts/workflow-storage-context/types"; import type { ClutchError } from "../Network/errors"; /** * The base for a short link route */ export declare const ShortLinkBaseRoute = "goto"; /** * Will return a ShortLink route * @param origin the windows origin * @param hash the hash to use for the short link * @returns string */ export declare const generateShortLinkRoute: (origin: string, hash: string) => string; interface ShortLinkProps { hydrate: (data: HydrateState) => void; onError: (error: ClutchError) => void; setLoading: (loading: boolean) => void; } /** * Component that will be present for a route which will look for a short link hash * If found * - It will set a loading state * - Then it will call down to the API with the hash and ask for any data pertaining to it * - If the API call is successful * - It will use the given hydrate function to send the returned state off to the StorageContext * - It will navigate to the route given in the returned state * - If the API call is not successful * - It will leave a warning message in the console * - Then navigate back to the home page * - Then it will remove the loading state */ declare const ShortLinkProxy: ({ hydrate, onError, setLoading }: ShortLinkProps) => any; export default ShortLinkProxy; //# sourceMappingURL=short-link-proxy.d.ts.map