import * as _nuxt_schema from '@nuxt/schema';
import { LocaleObject, Strategies, I18nRoutingOptions } from 'vue-i18n-routing';
import { Locale } from 'vue-i18n';
export { I18nOptions } from 'vue-i18n';
import { PluginOptions } from '@intlify/unplugin-vue-i18n';
import { ParsedPath } from 'path';

type RedirectOnOptions = 'all' | 'root' | 'no prefix';
interface DetectBrowserLanguageOptions {
    alwaysRedirect?: boolean;
    cookieCrossOrigin?: boolean;
    cookieDomain?: string | null;
    cookieKey?: string;
    cookieSecure?: boolean;
    fallbackLocale?: Locale | null;
    redirectOn?: RedirectOnOptions;
    useCookie?: boolean;
}
type LocaleType = 'static' | 'dynamic' | 'unknown';
type LocaleFile = {
    path: string;
    cache?: boolean;
};
type LocaleInfo = {
    /**
     * NOTE:
     *  The following fields are for `file` in the nuxt i18n module `locales` option
     */
    path?: string;
    hash?: string;
    type?: LocaleType;
    /**
     * NOTE:
     *  The following fields are for `files` (excludes nuxt layers) in the nuxt i18n module `locales` option.
     */
    paths?: string[];
    hashes?: string[];
    types?: LocaleType[];
} & Omit<LocaleObject, 'file' | 'files'> & {
    files: LocaleFile[];
    meta?: (FileMeta & {
        file: LocaleFile;
    })[];
};
type FileMeta = {
    path: string;
    loadPath: string;
    hash: string;
    type: LocaleType;
    parsed: ParsedPath;
    key: string;
};
type VueI18nConfigPathInfo = {
    relative?: string;
    absolute?: string;
    hash?: string;
    type?: LocaleType;
    rootDir: string;
    relativeBase: string;
    meta: FileMeta;
};
interface RootRedirectOptions {
    path: string;
    statusCode: number;
}
type CustomRoutePages = {
    [key: string]: false | {
        [key: string]: false | string;
    };
};
interface ExperimentalFeatures {
    jsTsFormatResource?: boolean;
}
interface BundleOptions extends Pick<PluginOptions, 'compositionOnly' | 'runtimeOnly' | 'fullInstall' | 'dropMessageCompiler'> {
}
interface CustomBlocksOptions extends Pick<PluginOptions, 'defaultSFCLang' | 'globalSFCScope'> {
}
interface LocaleMessageCompilationOptions {
    jit?: boolean;
    strictMessage?: boolean;
    escapeHtml?: boolean;
}

type NuxtI18nOptions<Context = unknown> = {
    vueI18n?: string;
    experimental?: ExperimentalFeatures;
    bundle?: BundleOptions;
    compilation?: LocaleMessageCompilationOptions;
    customBlocks?: CustomBlocksOptions;
    differentDomains?: boolean;
    detectBrowserLanguage?: DetectBrowserLanguageOptions | false;
    langDir?: string | null;
    lazy?: boolean;
    pages?: CustomRoutePages;
    customRoutes?: 'page' | 'config';
    /**
     * @internal
     */
    overrides?: Omit<NuxtI18nOptions<Context>, 'overrides'>;
    i18nModules?: {
        langDir?: string | null;
        locales?: NuxtI18nOptions<Context>['locales'];
    }[];
    rootRedirect?: string | null | RootRedirectOptions;
    routesNameSeparator?: string;
    skipSettingLocaleOnNavigate?: boolean;
    strategy?: Strategies;
    types?: 'composition' | 'legacy';
    debug?: boolean;
    dynamicRouteParams?: boolean;
    parallelPlugin?: boolean;
} & Pick<I18nRoutingOptions<Context>, 'baseUrl' | 'strategy' | 'defaultDirection' | 'defaultLocale' | 'locales' | 'defaultLocaleRouteNameSuffix' | 'routesNameSeparator' | 'trailingSlash'>;
type NuxtI18nInternalOptions = {
    __normalizedLocales?: LocaleObject[];
};

declare const _default: _nuxt_schema.NuxtModule<NuxtI18nOptions>;

type MaybePromise<T> = T | Promise<T>;
type LocaleSwitch<T extends string = string> = {
    oldLocale: T;
    newLocale: T;
};
type ModulePublicRuntimeConfig<Context = unknown> = Pick<NuxtI18nOptions<Context>, 'baseUrl' | 'experimental'>;
declare module '@nuxt/schema' {
    interface NuxtConfig {
        i18n?: NuxtI18nOptions<unknown>;
    }
    interface NuxtHooks {
        'i18n:registerModule': (registerModule: (config: Pick<NuxtI18nOptions<unknown>, 'langDir' | 'locales'>) => void) => void;
    }
    interface PublicRuntimeConfig {
        i18n?: ModulePublicRuntimeConfig;
    }
}
declare module '#app/nuxt' {
    interface RuntimeNuxtHooks {
        'i18n:beforeLocaleSwitch': <Context = unknown>(params: LocaleSwitch & {
            initialSetup: boolean;
            context: Context;
        }) => MaybePromise<void>;
        'i18n:localeSwitched': (params: LocaleSwitch) => MaybePromise<void>;
    }
}

export { type BundleOptions, type CustomBlocksOptions, type CustomRoutePages, type DetectBrowserLanguageOptions, type ExperimentalFeatures, type FileMeta, type LocaleFile, type LocaleInfo, type LocaleMessageCompilationOptions, type LocaleType, type NuxtI18nInternalOptions, type NuxtI18nOptions, type RedirectOnOptions, type RootRedirectOptions, type VueI18nConfigPathInfo, _default as default };
