import React, { type ForwardRefExoticComponent, type RefAttributes } from "react";
import { type LocationStateEntry } from "./location-state.js";
/**
 * State value or getter function for just-in-time state resolution (legacy)
 */
export type StateOrGetter<T = unknown> = T | (() => T);
/**
 * State prop type for Link component
 * - LocationStateEntry[]: Type-safe state entries (always lazy)
 * - StateOrGetter: Legacy format for backwards compatibility
 */
export type LinkState = LocationStateEntry[] | StateOrGetter;
/**
 * Prefetch strategy for the Link component
 * - "hover": Prefetch on mouse enter (uses native <link rel="prefetch">)
 * - "viewport": Prefetch when link enters viewport (not yet implemented)
 * - "hybrid": Hover on desktop, viewport on mobile (not yet implemented)
 * - "none": No prefetching (default)
 */
export type PrefetchStrategy = "hover" | "viewport" | "hybrid" | "none";
/**
 * Link component props
 */
export interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
    /**
     * The URL to navigate to (typically from router.reverse())
     */
    to: string;
    /**
     * Replace current history entry instead of pushing
     */
    replace?: boolean;
    /**
     * Scroll to top after navigation (default: true)
     */
    scroll?: boolean;
    /**
     * Force full document navigation instead of SPA
     */
    reloadDocument?: boolean;
    /**
     * Prefetch strategy for the link destination
     * @default "none"
     */
    prefetch?: PrefetchStrategy;
    /**
     * State to pass to history.pushState/replaceState.
     * Accessible via useLocationState() hook.
     *
     * @example
     * ```tsx
     * // Type-safe state with createLocationState (recommended)
     * const ProductState = createLocationState((p: Product) => ({ name: p.name }));
     * <Link to="/product" state={[ProductState(product)]}>View</Link>
     *
     * // Multiple typed states
     * <Link to="/checkout" state={[ProductState(p), CartState(c)]}>Checkout</Link>
     *
     * // Legacy: static state
     * <Link to="/product" state={{ from: "list" }}>View</Link>
     *
     * // Legacy: dynamic state (called at click time)
     * <Link to="/product" state={() => ({ scrollY: window.scrollY })}>View</Link>
     * ```
     */
    state?: LinkState;
    children: React.ReactNode;
}
/**
 * Type-safe Link component for SPA navigation
 *
 * Works with router.reverse() for type-safe URLs:
 * ```tsx
 * <Link to={router.reverse("shop.products.detail", { slug: "my-product" })}>
 *   View Product
 * </Link>
 * ```
 *
 * Also supports regular URLs:
 * ```tsx
 * <Link to="/about">About</Link>
 * <Link to="https://example.com">External</Link>
 * ```
 */
export declare const Link: ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>;
//# sourceMappingURL=Link.d.ts.map