import { a as Message, n as Config, t as Bucket } from "../../shapes-Dq0aJdsn.mjs"; /** * Where a locale's generated module goes: beside its catalogue, as `.js`. * * @throws If that is the catalogue itself, as for a formatter with a `.js` extension */ export declare function modulePathFor(bucket: Bucket, locale: string): string; /** * Build the source of a locale's generated module from its assembled record. * * The module is plain data, so it can cross a server/client boundary as JSON. * * @param record The locale's messages, keyed by id, as ICU */ export declare function generateCatalogueModule(record: Record): string; /** * Compile one locale's catalogue, and its fallbacks, into a module on disk. * * The fallback chain is merged here, so the app still imports one module per locale. */ export declare function emitCatalogueModule(config: Config, bucket: Bucket, locale: string): Promise<{ path: string; count: number; }>; export declare function mergeExtractedMessages(messages: Message[]): { message: string; translation?: string | undefined; id?: string | undefined; context?: string | undefined; comments: string[]; references: string[]; }[]; export declare function pruneLocaleMessages(existingMessages: Message[], sourceMessages: Message[]): { message: string; translation?: string | undefined; id?: string | undefined; context?: string | undefined; comments: string[]; references: string[]; }[]; export declare function expandBucketOutputPath(bucket: Bucket, locale: string, extension?: `.${string}`): string; /** * Resolve the fallback chain for a locale, most specific first. The source * locale (the first configured locale) is always the final fallback, so an * untranslated key ultimately resolves to the source string. */ export declare function resolveFallbackChain(config: Config, locale: string): string[]; /** * Resolve the catalogue files that contribute to a locale module, most specific * first. When the path does not map to a configured locale it is loaded on its * own. */ export declare function resolveCatalogueSources(config: Config, bucket: Bucket, path: string): { locale: string | undefined; sources: string[]; }; /** * Assemble a `{ id: string }` record from catalogue file contents. `contents` * must be aligned with the `sources` returned by {@link resolveCatalogueSources} * (most specific first): more specific locales override their fallbacks, and any * key still untranslated falls back to its source message. */ export declare function assembleCatalogueRecord(bucket: Bucket, contents: string[]): Record; export declare function readCatalogueMessages(bucket: Bucket, locale: string, path?: string): Promise<{ message: string; translation?: string | undefined; id?: string | undefined; context?: string | undefined; comments: string[]; references: string[]; }[]>; export declare function writeCatalogueMessages(bucket: Bucket, locale: string, messages: Message[], path?: string): Promise;