import type { TRuntimeContext } from '@modern-js/runtime'; import type React from 'react'; import type { I18nInstance } from './i18n'; interface RuntimeContextWithI18n extends TRuntimeContext { i18nInstance?: I18nInstance; } export declare function createContextValue(lang: string, i18nInstance: I18nInstance | undefined, entryName: string | undefined, languages: string[], localePathRedirect: boolean, ignoreRedirectRoutes: string[] | ((pathname: string) => boolean) | undefined, setLang: (lang: string) => void): { language: string; i18nInstance: I18nInstance; entryName: string | undefined; languages: string[]; localePathRedirect: boolean; ignoreRedirectRoutes: string[] | ((pathname: string) => boolean) | undefined; updateLanguage: (lang: string) => void; }; export declare function useSdkResourcesLoader(i18nInstance: I18nInstance | undefined, setForceUpdate: React.Dispatch>): void; /** * Hook to handle client-side redirect for locale path redirect in static deployments * This ensures that when users access paths without language prefix, they are redirected * to the localized version of the path * * Note: This hook only runs in CSR (Client-Side Rendering) scenarios. * In SSR/SSG scenarios, server-side middleware handles redirects, so this hook is skipped. * We use process.env.MODERN_TARGET to ensure this code is only included in browser bundles. */ export declare function useClientSideRedirect(i18nInstance: I18nInstance | undefined, localePathRedirect: boolean, languages: string[], fallbackLanguage: string, ignoreRedirectRoutes?: string[] | ((pathname: string) => boolean)): void; export declare function useLanguageSync(i18nInstance: I18nInstance | undefined, localePathRedirect: boolean, languages: string[], runtimeContextRef: React.MutableRefObject, prevLangRef: React.MutableRefObject, setLang: (lang: string) => void): void; export {};