export interface KaduLanguage { code: string; label: string; flag?: string; } /** * Legacy "plain" multi-lang value: a flat map keyed by language code. * Kept for non-Brendly consumers that opt into `multiLangShape="plain"` * on the directive. New code should prefer the rich shape below. */ export declare type KaduMultiLangValue = Record; /** * Selects the wire shape emitted/consumed by `KaduMultiLangDirective`. * * - `"rich"` (default) — `KaduMultiLangRichValue`. Mirrors the backend * `LocalizedString` DTO described in * `Repos/Brendly/brendly-api/i18n-plan.md` §3.1, §3.4 and round-trips * metadata (origin, autoTranslate, AI audit) losslessly. * - `"plain"` — legacy `KaduMultiLangValue` flat map; metadata is * dropped. */ export declare type KaduMultiLangShape = 'rich' | 'plain'; /** * Backend-aligned uppercase origin tag for a translation entry. The * directive's internal cell state uses lowercase `KaduLangOrigin` * (`'empty' | 'user' | 'ai'`); the uppercase form lives only on the * emit/consume boundary so that the wire shape matches what the * Brendly i18n backend stores (`origin` column in the translations * table — see `i18n-plan.md` §3.1). */ export declare type KaduMultiLangOrigin = 'USER' | 'AI'; /** * Single translation entry inside a `KaduMultiLangRichValue`. * * 1:1 mirror of the backend `LocalizedStringTranslation` DTO described * in `Repos/Brendly/brendly-api/i18n-plan.md` §3.1, §3.4. AI audit * fields (`aiTranslatedAt`, `aiModelVersion`) are present only when * `origin === 'AI'`. */ export interface KaduMultiLangRichTranslation { value: T; origin: KaduMultiLangOrigin; autoTranslate: boolean; aiTranslatedAt?: string; aiModelVersion?: string; } /** * Rich multi-lang value: original text in the primary language plus a * map of translations keyed by language code. * * 1:1 mirror of the backend `LocalizedString` DTO described in * `Repos/Brendly/brendly-api/i18n-plan.md` §3.1, §3.4. The update flow * is PUT-like (`i18n-plan.md` §11.4): the `translations` map is the * complete desired state — entries missing from the map are deleted * from the DB. */ export interface KaduMultiLangRichValue { original: T; originalLanguage: string; translations: Record>; } export declare type KaduLangOrigin = 'empty' | 'user' | 'ai'; export declare type KaduLangStatus = 'idle' | 'pending' | 'error'; export interface KaduLangCellState { value: T | null; origin: KaduLangOrigin; status: KaduLangStatus; stale: boolean; autoTranslate: boolean; lastError?: string; /** ISO timestamp recorded when the cell was last filled by the AI. */ aiTranslatedAt?: string; /** Model version string forwarded from the directive Input on AI fill. */ aiModelVersion?: string; } export declare type KaduMultiLangCellMap = Record>; export declare const KADU_MULTI_LANG_COPYABLE_INPUTS: ReadonlyArray;