import { UrlChangeEvent } from '../browser'; import { NavigationActionType } from '../types/navigationActionType/NavigationActionType'; export type NavigateOptions = { /** * A way to specify the action */ action?: Exclude; /** * Replaces path instead of push * @default false */ replace?: boolean; }; export type StoreValue = [ url: URL, action: NavigationActionType, previousValue?: [ url: URL, action: NavigationActionType ] ]; declare class HistoryStore { notification: Set<() => void>; private value; constructor(); /** * Get the current store value with proper URL types. * @returns The current store value. */ getValue(): StoreValue; /** * Navigate to a new URL using the History API. * @param url - The target URL to navigate to. * @param options - Optional navigation configuration (action and replace). */ navigate(url: URL, { action, replace }?: NavigateOptions): void; onUrlChange(cb: (state: UrlChangeEvent) => void): () => void; /** * Subscribe to URL changes. * @param notification - Callback to be called on URL changes. * @returns Unsubscribe function. */ subscribe: (notification: () => void) => () => void; } declare const _default: HistoryStore; export default _default;