import type { SerializedEntry, SessionState, TreeNode } from './state.js'; /** * Resolves a ref string (@c0, @c1, @root, ...) to a serialized entry. * Throws a descriptive error if the ref is not found. */ export declare function resolveRef(session: SessionState, ref: string): SerializedEntry; /** * Resolves a ref string to its entry ID. */ export declare function resolveRefToId(session: SessionState, ref: string): string; /** * Finds the TreeNode for a given ref. */ export declare function findTreeNode(session: SessionState, ref: string): TreeNode | null; /** * Builds a depth-first ordered tree from an entry map, assigning @c0, @c1... refs. * Returns updated refs, refsByEntry, and treeNodes arrays. */ export declare function buildTree(rootEntryId: string, entries: Record, locale: string): Pick; /** * Returns the field name for a navigation's item array ('items' or 'navigationItems'). * Prefers 'items' if both exist. Returns 'items' if neither exists (for new navigations). */ export declare function getNavigationItemsFieldName(entry: SerializedEntry, locale: string): string; /** * Creates a Contentful entry link object for inserting into content arrays. */ export declare function makeEntryLink(entryId: string): { sys: { type: 'Link'; linkType: 'Entry'; id: string; }; }; /** * Creates a Contentful asset link object for setting asset reference fields. */ export declare function makeAssetLink(assetId: string): { sys: { type: 'Link'; linkType: 'Asset'; id: string; }; }; //# sourceMappingURL=refs.d.ts.map