import { LinguiConfigNormalized, OrderBy, OrderByFn } from "@lingui/conf";
import { FormatterWrapper } from "./formats/index.js";
import { CompiledCatalogNamespace } from "./compile.js";
import { GetTranslationsOptions } from "./catalog/getTranslationsForCatalog.js";
import { AllCatalogsType, CatalogType, ExtractedCatalogType } from "./types.js";
import { ExtractWorkerPool } from "./workerPools.js";
export type MakeOptions = {
    files?: string[];
    clean: boolean;
    overwrite: boolean;
    locale?: string[];
    orderBy: OrderBy;
    workerPool?: ExtractWorkerPool;
};
export type MakeTemplateOptions = {
    files?: string[];
    orderBy: OrderBy;
    workerPool?: ExtractWorkerPool;
};
export type MergeOptions = {
    overwrite?: boolean;
    files?: string[];
};
export type CatalogProps = {
    name?: string;
    path: string;
    include: Array<string>;
    exclude?: Array<string>;
    templatePath?: string;
    format: FormatterWrapper;
};
export declare class Catalog {
    config: LinguiConfigNormalized;
    name?: string;
    path: string;
    include: Array<string>;
    exclude: Array<string>;
    format: FormatterWrapper;
    templateFile: string;
    constructor({ name, path, include, templatePath, format, exclude }: CatalogProps, config: LinguiConfigNormalized);
    getFilename(locale: string): string;
    make(options: MakeOptions): Promise<AllCatalogsType | false>;
    makeTemplate(options: MakeTemplateOptions): Promise<CatalogType | false>;
    /**
     * Collect messages from source paths. Return a raw message catalog as JSON.
     */
    collect(options?: {
        files?: string[];
        workerPool?: ExtractWorkerPool;
    }): Promise<ExtractedCatalogType | undefined>;
    merge(prevCatalogs: AllCatalogsType, nextCatalog: ExtractedCatalogType, options: MergeOptions): {
        [k: string]: CatalogType;
    };
    getTranslations(locale: string, options: GetTranslationsOptions): Promise<{
        missing: import("./catalog/getTranslationsForCatalog.js").TranslationMissingEvent[];
        messages: {
            [id: string]: string;
        };
    }>;
    write(locale: string, messages: CatalogType): Promise<[created: boolean, filename: string]>;
    writeTemplate(messages: CatalogType): Promise<void>;
    read(locale: string): Promise<CatalogType | undefined>;
    readAll(locales?: string[]): Promise<AllCatalogsType>;
    readTemplate(): Promise<CatalogType | undefined>;
    get sourcePaths(): string[];
    get localeDir(): string;
    get locales(): string[] & never[];
}
export declare function cleanObsolete<T extends CatalogType>(messages: T): T;
export declare function order<T extends CatalogType>(by: OrderBy, catalog: T): T;
export declare function writeCompiled(path: string, locale: string, compiledCatalog: string, namespace?: CompiledCatalogNamespace): Promise<string>;
export declare const orderByMessage: OrderByFn;
