import { a as Message, n as Config, t as Bucket } from "../../shapes-CRlXtss0.mjs"; //#region src/features/catalogue/merge.d.ts declare function mergeExtractedMessages(messages: Message[]): { message: string; comments: string[]; references: string[]; translation?: string | undefined; id?: string | undefined; context?: string | undefined; }[]; declare function pruneLocaleMessages(existingMessages: Message[], sourceMessages: Message[]): { message: string; comments: string[]; references: string[]; translation?: string | undefined; id?: string | undefined; context?: string | undefined; }[]; //#endregion //#region src/features/catalogue/path.d.ts declare function expandBucketOutputPath(bucket: Bucket, locale: string, extension?: `.${string}`): string; /** * The declaration file that types a catalogue, e.g. `en.json` -> `en.d.json.ts`. * * TypeScript resolves `./en.json` by stripping the extension and looking for * `en.d.json.ts`; the `en.json.d.ts` form is only consulted for extensions the * resolver does not recognise. Non-JS extensions additionally require * `allowArbitraryExtensions` in the consumer's tsconfig. */ declare function declarationPathFor(cataloguePath: string): string; //#endregion //#region src/features/catalogue/record.d.ts /** * 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. */ 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. */ 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. */ declare function assembleCatalogueRecord(bucket: Bucket, contents: string[]): Record; //#endregion //#region src/features/catalogue/storage.d.ts declare function readCatalogueMessages(bucket: Bucket, locale: string, path?: string): Promise<{ message: string; comments: string[]; references: string[]; translation?: string | undefined; id?: string | undefined; context?: string | undefined; }[]>; declare function writeCatalogueMessages(bucket: Bucket, locale: string, messages: Message[], path?: string): Promise; //#endregion export { assembleCatalogueRecord, declarationPathFor, expandBucketOutputPath, mergeExtractedMessages, pruneLocaleMessages, readCatalogueMessages, resolveCatalogueSources, resolveFallbackChain, writeCatalogueMessages };