/** * Optional per-locale display-name overrides for catalog entities * (products, categories, etc.) that also have a universal `name`. * * {@link LocalizedTextMap} is the same shape for universal `description` fields * (e.g. SalesPoint `descriptionLocales`). * * Distinct from {@link LocalizedLabel} (required cs/en UI copy maps). */ export type NameLocale = 'cs' | 'en' | 'sk'; export type LocalizedNameMap = { cs?: string; en?: string; sk?: string; }; /** Alias for optional cs/en/sk text overrides (descriptions, etc.). Same shape as {@link LocalizedNameMap}. */ export type LocalizedTextMap = LocalizedNameMap; /** Keys accepted on {@link LocalizedNameMap}; useful for Zod / form iteration. */ export declare const LOCALIZED_NAME_MAP_KEYS: readonly ["cs", "en", "sk"]; /** Alias of {@link LOCALIZED_NAME_MAP_KEYS} for description / body-text locale maps. */ export declare const LOCALIZED_TEXT_MAP_KEYS: readonly ["cs", "en", "sk"]; /** * Zod-friendly plain shape description (shared has no zod dependency). * Backend can build: * `z.object({ cs: z.string(), en: z.string(), sk: z.string() }).partial().optional().nullable()` * then `.transform((v) => normalizeNameLocales(v, universalName))`. */ export declare const NAME_LOCALES_PLAIN_SHAPE: { readonly cs: "string"; readonly en: "string"; readonly sk: "string"; }; /** Alias of {@link NAME_LOCALES_PLAIN_SHAPE} for description locale validation. */ export declare const TEXT_LOCALES_PLAIN_SHAPE: { readonly cs: "string"; readonly en: "string"; readonly sk: "string"; }; /** Map an i18n language / BCP-47 tag (or exact NameLocale) to a NameLocale. */ export declare function toNameLocale(locale: NameLocale | string): NameLocale | null; /** * Trim, drop empties, omit locale values that equal the universal name. * Returns `null` when nothing remains (including null/undefined input). */ export declare function normalizeNameLocales(nameLocales: LocalizedNameMap | null | undefined, universalName: string): LocalizedNameMap | null; /** * Prefer a non-empty locale override from `nameLocales`; otherwise the universal `name`. */ export declare function resolveLocalizedName(name: string, nameLocales: LocalizedNameMap | null | undefined, locale: NameLocale | string): string; /** * Trim, drop empties, omit locale values that equal the universal description. * Returns `null` when nothing remains (including null/undefined input). */ export declare function normalizeDescriptionLocales(descriptionLocales: LocalizedTextMap | null | undefined, universalDescription: string): LocalizedTextMap | null; /** * Prefer a non-empty locale override from `descriptionLocales`; otherwise the universal `description`. */ export declare function resolveLocalizedDescription(description: string, descriptionLocales: LocalizedTextMap | null | undefined, locale: NameLocale | string): string; //# sourceMappingURL=localizedNameMap.d.ts.map