import type JSZip from 'jszip'; export interface DocxHyperlinkDestination { kind: 'external' | 'internal'; relationshipId?: string; target: string; } interface RelationshipRecord { id: string; target: string; targetMode: string; type: string; } interface RelationshipDocument { byId: Map; document: Document; usedIds: Set; } export interface DocxHyperlinkRelationshipState { archive: JSZip; dirty: boolean; generated: RelationshipDocument | null; generatedMalformed: boolean; path: string; source: RelationshipDocument | null; } export interface DocxExternalHyperlinkRequest { sourceId: string; target: string; } /** Safe external hyperlink targets keyed by relationship Id. */ export type DocxExternalHyperlinkTargets = ReadonlyMap; export declare const EMPTY_DOCX_EXTERNAL_HYPERLINK_TARGETS: DocxExternalHyperlinkTargets; /** * Builds the admission lookup for relationship-bound external hyperlinks. * Only http(s)/mailto targets with TargetMode=External and a hyperlink * relationship type are retained; unsafe or internal targets stay absent. */ export declare function createDocxExternalHyperlinkTargets(relationships: Iterable<{ id: string; target: string; type: string; targetMode?: string; }>): DocxExternalHyperlinkTargets; export declare function loadDocxHyperlinkRelationshipState(generatedArchive: JSZip, sourceArchive: JSZip, ownerPart: string): Promise; export declare function readDocxHyperlinkDestination(hyperlink: Element, state: DocxHyperlinkRelationshipState, role: 'generated' | 'source'): DocxHyperlinkDestination | null; export declare function ensureDocxExternalHyperlinkRelationships(state: DocxHyperlinkRelationshipState, requests: readonly DocxExternalHyperlinkRequest[]): string[] | null; export declare function setDocxHyperlinkDestination(hyperlink: Element, root: Element, destination: DocxHyperlinkDestination, relationshipId?: string): boolean; export declare function flushDocxHyperlinkRelationships(state: DocxHyperlinkRelationshipState): void; export {};