import { type XmlElement } from '../xml/index.js'; export interface Relationship { id: string; type: string; target: string; /** `External` for `TargetMode="External"` (hyperlinks, linked media), else `Internal`. */ mode: 'Internal' | 'External'; } /** Parses a `.rels` part into a map keyed by relationship id; an absent part gives an empty map. */ export declare function parseRelationships(xml: string | undefined): Map; /** A relationship to serialize; its id is the key of the map it is stored in. */ export type RelationshipInput = Omit & { id?: string; }; /** Serializes relationships into a `.rels` part, using each map key as the relationship id. */ export declare function buildRelationshipsXml(relationships: ReadonlyMap): string; /** * Resolves a relationship `Target` against the part that declared it. Absolute targets (leading * `/`) are package-rooted; relative ones resolve against the declaring part's folder, handling * `.` and `..` segments. Returns a package part name without a leading slash. */ export declare function resolvePartPath(basePart: string, target: string): string; /** The `.rels` part name that holds the relationships of `partName` (`word/document.xml` -> `word/_rels/document.xml.rels`). */ export declare function relationshipsPartFor(partName: string): string; /** The first `rIdN` that is not in `used`; the caller records the result. */ export declare function nextRelationshipId(used: ReadonlySet): string; /** The `r:id` relationship reference on an element such as `w:headerReference`. */ export declare const getRelationshipId: (element: XmlElement) => string | undefined; //# sourceMappingURL=relationships.d.ts.map