import { UseLocaleResult as UseLocaleResult$1 } from "react-intlayer"; import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation"; //#region src/client/useLocale.d.ts type UseLocaleProps = { isCookieEnabled?: boolean; onLocaleChange?: (locale: DeclaredLocales) => void; onChange?: 'replace' | 'push' | 'none' | ((params: { locale: LocalesValues; path: string; }) => void); }; type UseLocaleResult = UseLocaleResult$1 & { pathWithoutLocale: string; }; /** * Hook to manage the current locale in Next.js App Router. * * This hook extends the base `useLocale` from `react-intlayer` by adding * Next.js-specific navigation logic for locale changes. * * @param props - Optional properties to configure locale change behavior. * @returns An object containing the current locale, path without locale, and functions to update the locale. * * @example * ```tsx * 'use client'; * * import { useLocale } from 'next-intlayer'; * * const LocaleSwitcher = () => { * const { setLocale } = useLocale({ onChange: 'push' }); * * return ( * * ); * }; * ``` */ declare const useLocale: ({ onChange, onLocaleChange, isCookieEnabled }?: UseLocaleProps) => UseLocaleResult; //#endregion export { UseLocaleProps, UseLocaleResult, useLocale }; //# sourceMappingURL=useLocale.d.ts.map