import React from 'react'; import { Link as InertiaLink } from '@inertiajs/react'; import type { RouteParams, Routes } from '../common.ts'; /** * Parameters required for route navigation with proper type safety. */ export type LinkParams = RouteParams; /** * Props for the Link component when using route-based navigation */ export type LinkRouteProps = Omit, 'href' | 'method'> & LinkParams & { href?: never; }; /** * Props for the Link component when using direct href */ export type LinkHrefProps = Omit, 'route'> & { route?: never; }; /** * Union type for Link component props - either route-based or direct href */ export type LinkProps = LinkRouteProps | LinkHrefProps; /** * Internal Link component implementation with forward ref support. * Resolves route parameters and generates the appropriate URL and HTTP method * for Inertia navigation when using route-based navigation. * Falls back to standard InertiaLink when href is provided directly. * * @param props - Link properties including route and parameters, or direct href * @param ref - Forward ref for the underlying InertiaLink component */ declare function LinkInner(props: LinkProps, ref?: React.ForwardedRef>): import("react/jsx-runtime").JSX.Element; /** * Type-safe Link component for Inertia.js navigation. * * Provides compile-time route validation and automatic parameter type checking * based on your application's route definitions. Automatically resolves the * correct URL and HTTP method for each route. Alternatively, you can use * the standard href prop for direct navigation. * * @example * ```tsx * // Link to a route without parameters * Home * * // Link to a route with required parameters * * View User * * * // Link with direct href * About * ``` */ export declare const Link: (props: LinkProps & { ref?: React.Ref>; }) => ReturnType; export {};