/** * Localization Data * * The document-scoped state behind the per-prop controls: a translation's * authority overrides, and the translatability map the canonical page carries in * its own content. One control mounts per field in the panel and they share a * query key per document, so a panel of any width costs one request and a write * lands in every control at once. */ import type { AuthorityOverridesResult, PropAuthority } from '@pantheon-systems/css-client'; import type { PropTarget } from './prop-target.js'; export interface LocalizationData { /** The current document is a translation of a canonical page. */ isTranslation: boolean; /** The current document is a canonical page. */ isCanonical: boolean; /** Resolved authority overrides for a translation; null on a canonical page. */ authority: AuthorityOverridesResult | null; /** The canonical page's translatability map, as the editor currently holds it. */ translatableMap: unknown; /** * The document's answer has arrived. A control rendered without it would show * a guessed authority, and a click on that guess writes the wrong thing, so a * read that failed leaves this false rather than falling back to a default. */ loaded: boolean; /** A write is in flight. */ busy: boolean; setAuthority: (target: PropTarget & { authority: PropAuthority; }) => void; setTranslatable: (target: PropTarget & { translatable: boolean; }) => void; } export declare function useLocalizationData(): LocalizationData;