///
import React, { ComponentProps, ReactElement } from 'react';
import BaseLinkWithLocale from '../shared/BaseLinkWithLocale';
import { AllLocales } from '../shared/types';
type Props = Omit, 'locale'> & {
locale?: Locales[number];
};
/**
* Wraps `next/link` and prefixes the `href` with the current locale if
* necessary.
*
* @example
* ```tsx
* import {Link} from 'next-intl';
*
* // When the user is on `/en`, the link will point to `/en/about`
* About
*
* // You can override the `locale` to switch to another language
* Switch to German
* ```
*
* Note that when a `locale` prop is passed to switch the locale, the `prefetch`
* prop is not supported. This is because Next.js would prefetch the page and
* the `set-cookie` response header would cause the locale cookie on the current
* page to be overwritten before the user even decides to change the locale.
*/
declare const BaseLinkWithRef: (props: Omit, keyof {
href: string | import("url").UrlObject;
as?: (string | import("url").UrlObject) | undefined;
replace?: boolean | undefined;
scroll?: boolean | undefined;
shallow?: boolean | undefined;
passHref?: boolean | undefined;
prefetch?: boolean | undefined;
locale?: string | false | undefined;
legacyBehavior?: boolean | undefined;
onMouseEnter?: React.MouseEventHandler | undefined;
onTouchStart?: React.TouchEventHandler | undefined;
onClick?: React.MouseEventHandler | undefined;
}> & {
href: string | import("url").UrlObject;
as?: (string | import("url").UrlObject) | undefined;
replace?: boolean | undefined;
scroll?: boolean | undefined;
shallow?: boolean | undefined;
passHref?: boolean | undefined;
prefetch?: boolean | undefined;
locale?: string | false | undefined;
legacyBehavior?: boolean | undefined;
onMouseEnter?: React.MouseEventHandler | undefined;
onTouchStart?: React.TouchEventHandler | undefined;
onClick?: React.MouseEventHandler | undefined;
} & {
children?: React.ReactNode;
} & React.RefAttributes, "locale"> & {
locale: string;
}, "ref"> & React.RefAttributes, "locale"> & {
locale?: Locales[number] | undefined;
} & {
ref?: React.Ref | undefined;
}) => ReactElement;
export default BaseLinkWithRef;