import { At as RuntimeTranslateManyOptions, C as VariableType, D as VariableTransformationSuffix, S as Variable, dt as FileFormat, g as LocaleProperties, h as JsxElement, m as JsxChildren, p as JsxChild } from "./types-algPgkHv.mjs"; import { n as declareVar, r as decodeVars, t as derive } from "./derive-VfZjYfIU.mjs"; import { IcuMessage } from "@generaltranslation/format/types"; //#region src/settings/settingsUrls.d.ts declare const defaultCacheUrl: "https://cdn.gtx.dev"; declare const defaultBaseUrl: "https://api2.gtx.dev"; declare const defaultRuntimeApiUrl: "https://runtime2.gtx.dev"; //#endregion //#region src/logging/diagnostics.d.ts type DiagnosticSeverity = 'Error' | 'Warning'; /** * Text slots follow the five-part error message model: * what happened, reassurance, why it happened, how to fix it, and a way out. */ type DiagnosticMessageInput = { source?: string; severity?: DiagnosticSeverity; whatHappened: string; reassurance?: string; why?: string; fix?: string; wayOut?: string; details?: string | string[]; docsUrl?: string; }; declare function formatDiagnosticErrorDetails(error: unknown): string | undefined; declare function createDiagnosticMessage({ source, severity, whatHappened, reassurance, why, fix, wayOut, details, docsUrl }: DiagnosticMessageInput): string; //#endregion //#region src/settings/settings.d.ts declare const libraryDefaultLocale: "en"; //#endregion //#region src/settings/plurals.d.ts declare const pluralForms: readonly ["singular", "plural", "dual", "zero", "one", "two", "few", "many", "other"]; type PluralType = (typeof pluralForms)[number]; declare function isAcceptedPluralForm(form: string): form is PluralType; //#endregion //#region src/locales/getPluralForm.d.ts /** * Given a number and a list of allowed plural forms, return the plural form that best fits the number. * * @param {number} n - The number to determine the plural form for. * @param {PluralType[]} forms - The allowed plural forms. * @returns {PluralType} The determined plural form, or an empty string if none fit. */ declare function _getPluralForm(n: number, forms?: readonly PluralType[], locales?: string[]): PluralType | ''; //#endregion //#region src/utils/isVariable.d.ts declare function isVariable(obj: unknown): obj is Variable; //#endregion //#region src/utils/minify.d.ts declare function minifyVariableType(variableType: VariableTransformationSuffix): VariableType; //#endregion //#region src/utils/base64.d.ts declare function encode(data: string): string; declare function decode(base64: string): string; //#endregion //#region src/utils/isSupportedFileFormatTransform.d.ts /** * This function checks if a file format transformation is supported during translation * @param from - The source file format. * @param to - The target file format. * @returns True if the transformation is supported, false otherwise */ declare function isSupportedFileFormatTransform(from: FileFormat, to: FileFormat): boolean; //#endregion //#region src/translate/api.d.ts declare const API_VERSION = "2026-03-06.v1"; //#endregion //#region src/derive/indexVars.d.ts /** * Given an ICU string adds identifiers to each _gt_ placeholder * indexVars('Hello {_gt_} {_gt_} World') => 'Hello {_gt_1_} {_gt_2_} World' */ declare function indexVars(icuString: IcuMessage): string; //#endregion //#region src/derive/extractVars.d.ts /** * Given an unindexed ICU string, extracts all the _gt_ variables and an indexed mapping of the variable to the values * * extractVars('Hello {_gt_, select, other {World}}') => { _gt_1: 'World' } * * @param {string} icuString - The ICU string to extract variables from. * @returns {Record} A mapping of the variable to the value. */ declare function extractVars(icuString: string): Record; //#endregion //#region src/derive/condenseVars.d.ts /** * Given an indexed ICU string, condenses any select to an argument * Unindexed _gt_ source strings and indexed _gt_# translation strings * are mutually exclusive. * indexVars('Hello {_gt_1, select, other {World}}') => 'Hello {_gt_1}' * @param {string} icuString - The ICU string to condense. * @returns {string} The condensed ICU string. */ declare function condenseVars(icuString: string): string; //#endregion //#region src/derive/utils/constants.d.ts declare const VAR_IDENTIFIER = "_gt_"; //#endregion export { API_VERSION, type DiagnosticMessageInput, type DiagnosticSeverity, type JsxChild, type JsxChildren, type JsxElement, type LocaleProperties, type RuntimeTranslateManyOptions, VAR_IDENTIFIER, condenseVars, createDiagnosticMessage, declareVar, decode, decodeVars, defaultBaseUrl, defaultCacheUrl, defaultRuntimeApiUrl, derive, encode, extractVars, formatDiagnosticErrorDetails, _getPluralForm as getPluralForm, indexVars, isAcceptedPluralForm, isSupportedFileFormatTransform, isVariable, libraryDefaultLocale, minifyVariableType, pluralForms }; //# sourceMappingURL=internal.d.mts.map