/**
 * Shared location state utilities - works in both RSC and client contexts
 * No "use client" directive so it can be imported from RSC
 */
/**
 * Internal entry representing a state value with its unique key
 */
export interface LocationStateEntry {
    readonly __rsc_ls_key: string;
    readonly __rsc_ls_value: unknown;
}
/**
 * Type-safe location state definition
 *
 * Created via createLocationState(), used with Link's state prop
 * and useLocationState() hook.
 */
export interface LocationStateDefinition<TArgs extends unknown[], TState> {
    (...args: TArgs): LocationStateEntry;
    readonly __rsc_ls_key: string;
}
/**
 * Create a type-safe location state definition
 *
 * The key is auto-generated by the Vite exposeInternalIds plugin based on
 * file path and export name. No manual key required.
 *
 * @param key Auto-injected by Vite plugin, do not provide manually
 * @returns A typed state definition for use with Link and useLocationState
 *
 * @example
 * ```typescript
 * // Define typed state (key auto-generated from file + export)
 * export const ProductState = createLocationState<{ name: string; price: number }>();
 *
 * // Use in Link - state is captured at click time
 * <Link to="/product/123" state={[ProductState({ name: product.name, price: product.price })]}>
 *   View Product
 * </Link>
 *
 * // Multiple states
 * <Link to="/checkout" state={[ProductState(productData), CartState(cartData)]}>
 *   Checkout
 * </Link>
 *
 * // For lazy evaluation (click-time), pass a getter
 * <Link to="/product" state={[ProductState(() => ({ name: product.name }))]}>
 *
 * // Read with type safety
 * const productState = useLocationState(ProductState);
 * // productState: { name: string; price: number } | undefined
 * ```
 */
export declare function createLocationState<TState>(key?: string): LocationStateDefinition<[TState | (() => TState)], TState>;
/**
 * Check if a value is a LocationStateEntry
 */
export declare function isLocationStateEntry(value: unknown): value is LocationStateEntry;
/**
 * Resolve state entries into a flat object for history.state
 */
export declare function resolveLocationStateEntries(entries: LocationStateEntry[]): Record<string, unknown>;
//# sourceMappingURL=location-state-shared.d.ts.map