/** * The i18n `ViaBinding` — wires the i18n engine (auto-translate/script * enforcement/validation/densify on write; locale + dict-label presentation * on read) into the kernel's generic Via port. Mirrors * `via/money/binding.ts`'s #553 static-link pattern. * * LIVE (#623 Task 8 wired the cutover): `i18nBinding()`/`linkI18nVia()` are * the real put/read path for every i18n-declaring collection — * `collection.ts`'s `_putInternal`/`applyLocaleToRecord` (the call sites * this file's bodies were moved/adapted from) now delegate their i18n * stages to `this.via.encodeWrite`/`this.via.present` instead of running * the hand-wired i18n logic inline. * * `i18nText()`, `dictKey()`, `staticDict()` each call {@link linkI18nVia} * first — the same #553 pattern `money()` uses. */ import type { ViaBinding } from '../../kernel/via/index.js'; /** * Config a collection's i18n declarations resolve to — the binding's * construction input. Fields are loosely typed (`unknown`) at this seam * because the kernel's `ViaBinder` contract is opaque-config-in; the * concrete i18n types are applied inside the binding's own functions. */ export interface I18nViaConfig { i18nFields?: Record; dictKeyFields?: Record; i18nDensifyFields?: Record; strategy: unknown; defaultLocale?: string; autoTranslateHook?: (...args: unknown[]) => Promise; dictLabelResolver?: (...args: unknown[]) => Promise; i18nPutValidator?: (record: unknown) => void; collectionName: string; } export declare function i18nBinding(cfg: I18nViaConfig): ViaBinding; export declare function linkI18nVia(): void;