import type { LocationStateDefinition } from "./location-state-shared.js"; export { createLocationState, isLocationStateEntry, resolveLocationStateEntries, type LocationStateEntry, type LocationStateDefinition, } from "./location-state-shared.js"; /** * Hook to read location state from history.state * * Overloaded: * - With definition: Returns typed state from the specific key * - With type param only: Returns legacy state from history.state.state (backwards compat) * * @example * ```typescript * // Typed access with definition (recommended) * const ProductState = createLocationState<{ name: string }>("product"); * const state = useLocationState(ProductState); * // state: { name: string } | undefined * * // Legacy typed access (backwards compatible) * const legacyState = useLocationState<{ from?: string }>(); * ``` */ export declare function useLocationState(definition: LocationStateDefinition): TState | undefined; export declare function useLocationState(): T | undefined; //# sourceMappingURL=location-state.d.ts.map